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

Loading Screenshots cause a 404 and could not be displayed #13

Open
omid1234 opened this issue May 25, 2020 · 10 comments
Open

Loading Screenshots cause a 404 and could not be displayed #13

omid1234 opened this issue May 25, 2020 · 10 comments

Comments

@omid1234
Copy link

Error Description:
If there is an error in the test, screenshot will be taken and stored in the defined folder. So far so good, but it could not be displayed in the report tab in azure build. In the execution in the IDE i could see screenshots and inline screenshots from the app.
After looking in the dev tools from Chrome, i could see that the image could not be found, there is a HTTP 404

@maciejmaciejewski Could you please provide support? That would be awesome :)

image

Code Snippet (config from protractor.config.json):

    jasmine.getEnv().addReporter(
      new HtmlReporter({
        baseDirectory: 'e2e/reports',
        screenshotsSubfolder: 'image',
        jsonsSubfolder: 'jsons',
        gatherBrowserLogs: true,
        preserveDirectory: false
      }).getJasmine2Reporter()
    );
@omid1234
Copy link
Author

Additionaly providing the destination address of the images that could noct been found:

https://maciejmaciejewski.gallerycdn.vsassets.io/extensions/maciejmaciejewski/azure-pipelines-protractor/1.1.1/1587387961180/dist/image\0095004e-008e-00e5-00a3-00e100e6001f.png

of course differs from local exec in ide:

file:///C:/dev/e2e/reports/image\000c00d6-00c6-00c8-00c1-002f001a0018.png where it works perfectly fine

@maciejmaciejewski
Copy link
Owner

Hey @omid1234 and sorry for late response,
I have noticed that the address with gallerycdn is wrongly used when images are misconfigured. Could you please change screenshotsSubfolder from image dir to screenshots

@PandharinathJadhav-Wellsky
Copy link

PandharinathJadhav-Wellsky commented Jul 13, 2020

Hi @maciejmaciejewski - Same issue for me , not able to view screenshot image on azure pipeline. so changing screenshotsSubfolder from image dir to screenshots will resolve the issue?
my configuration
baseDirectory: 'e2e_report/chrome',
screenshotsSubfolder: 'images',

@maciejmaciejewski
Copy link
Owner

@PandharinathJadhav-Wellsky
Yes, the reporting tool is expecting screenshots to be within the screenshots dir.

@PandharinathJadhav-Wellsky

@PandharinathJadhav-Wellsky
Yes, the reporting tool is expecting screenshots to be within the screenshots dir.

@maciejmaciejewski
I changed the screenshotsSubfolder: 'screenshots', now its failing to load the report in azure with below error on console
image

@maciejmaciejewski
Copy link
Owner

So screenshots are loading but there is some fishy with them, I will add some logging capability for easier debugging.
In the meantime can you provide task logs with system.debug variable set to true?

@PandharinathJadhav-Wellsky
Copy link

PandharinathJadhav-Wellsky commented Jul 15, 2020

So screenshots are loading but there is some fishy with them, I will add some logging capability for easier debugging.
In the meantime can you provide task logs with system.debug variable set to true?

No, now report its not loading it self.
image

@maciejmaciejewski
Copy link
Owner

What I meant is that you can see in the logs that extension is getting the list of attachments but cannot load them into the report. I will add more debugging option for easier troubleshooting.

@maciejmaciejewski
Copy link
Owner

maciejmaciejewski commented Jul 17, 2020

@PandharinathJadhav-Wellsky
I have added more logs so you can have a look at the browser.

@maciejmaciejewski
Copy link
Owner

@PandharinathJadhav-Wellsky
I have learned that
https://maciejmaciejewski.gallerycdn.vsassets.io/extensions/maciejmaciejewski/azure-pipelines-protractor/1.1.1/1587387961180/dist/image is used as a base path to the extension and appended to urls when you have no screenshot attachments uploaded correctly.

Could you please look at the task logs run it with system.debug=true and get back to me with results.

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

No branches or pull requests

3 participants