Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is impossible to open screenshots in generated report by mouseClick(). #170

Closed
zhukovsv opened this issue Sep 3, 2019 · 4 comments
Closed

Comments

@zhukovsv
Copy link

zhukovsv commented Sep 3, 2019

Trying to open screenshots in report by mouseClick:

  • Problem : it is impossible to open screenshots in generated report by mouseClick().
  1. "protractor-beautiful-reporter": "1.3.0"
  2. Google Chrome: Version 76.0.3809.132 (Official Build) (64-bit)
  3. Console error:
    image
  4. Error text:
    angular.min.js:110 Access to XMLHttpRequest at 'file:///C:/Users/.../Downloads/.../pbr-screenshot-modal.html' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.

As I understand the problem appears after new functionality was added in 1.3.0 version. New functionality related to the next files:
image

Problem disappears if version is reversed to 1.2.9.

Is it possible to find problem solution with new functionality added in 1.3.0?

Regards, Sergei.

@miller45
Copy link
Collaborator

miller45 commented Sep 5, 2019

@zhukovsv First of all thank for the precise description :-)
Update: It is fixed now...just use version 1.3.1
It think it did not test opening the files with from a local folder, but with a temporary web server.
So i did not detect that it does not work when you open the report directly from file system.
Chrome just blocks ajax request for file protocol, so the report cannot load the pbrmodal files if open directly from the files system.
While I search for a solution you can do the following in the meantime:

  • open a shell (e.g. cmd in windows)
  • install a simple http server via npm install -g http-server.
  • go into reports folder and type http-server .
  • type the following url into chrome `http://localhost:8080

@miller45 miller45 added the bug label Sep 5, 2019
@miller45
Copy link
Collaborator

miller45 commented Sep 5, 2019

@zhukovsv I published the version 1.3.1 which fixes this issue

@miller45
Copy link
Collaborator

miller45 commented Sep 6, 2019

Fixed in 1.3.1 and tested

@miller45 miller45 closed this as completed Sep 6, 2019
@zhukovsv
Copy link
Author

Thanks a lot. :-) 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants