percy / percy-ember

Ember addon for visual regression testing with Percy
https://docs.percy.io/docs/ember
MIT License
73 stars 44 forks source link

Invalid URL or path when running separate build and test steps #51

Closed adamhong closed 6 years ago

adamhong commented 6 years ago

In our CI setup, we have separate build + test steps: https://percy.io/docs/clients/javascript/ember#separate-build-and-test-steps

When actually running the test steps, I am seeing the following error:

[percy][ERROR] API call failed, Percy has been disabled for this build.
StatusCodeError: 400 - {"errors":[{"status":"bad_request","detail":"Invalid URL or path: undefined/<FILENAME>"}]}

Tracked this down to the following:

https://github.com/percy/ember-percy/blob/master/index.js#L51

normalizedRootUrl is undefined at runtime when running build + tests separately. It appears that the config method is not called before in this scenario.

adamhong commented 6 years ago

appears to be another issue, possibly misconfiguration. seeing the same thing running build + tests together. will update with resolution

actually is related 🤕 will run build + test together for now. will investigate a fix

timhaines commented 6 years ago

@adamhong could you possibly provide us with a simple reproduction?

adamhong commented 6 years ago

@timhaines yes, sorry for delayed response. i'll update with repro steps. thanks!

fotinakis commented 6 years ago

@adamhong we have another customer who we believe hit this same issue. Could you send us your ember build --environment=test and ember exam ... commands from your package.json so we can see if there's some specific configuration you're using there that might cause this? We do a similar split build/test steps but haven't encountered this issue ourselves.