-
Notifications
You must be signed in to change notification settings - Fork 356
Experiencing "Error: JSON schema not found at file://" #451
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
Comments
Thanks for the heads-up. Could you please let me know the URI of the schema that's triggering the error, and how that schema is loaded? Also, does that schema contain an id, and / or any relative $ref? |
I'm not entirely sure, but this looks like it could be it: https://github.com/composer/composer/blob/af519de0de087acb11450c2c10225377c8a909ff/res/composer-repository-schema.json From https://github.com/composer/composer/search?utf8=%E2%9C%93&q=json-schema&type= |
I'm having difficulty reproducing this. I've done the following:
Step 4 (i.e. the first failing travis test) seems to work perfectly without error, as do the other failing tests. Are you able to provide a minimal test case, or instructions to reproduce? |
|
I've triggered a build to reproduce: wp-cli/wp-cli#4396 |
I suspect I know what the issue is (now that I've managed to compare 5.2.1 and 5.2.2). WP-CLI is built and distributed as a Phar archive. As such, prepending I don't know enough about the json-schema codebase to offer an alternative at this point :/ |
@danielbachhuber It shouldn't be prepending I'll investigate to see if there's a possibility that something might be coming through from a phar archive that does not have a |
I think it's caused by this. Nonsensical behavior, and apparently not a bug (although noting that phar archives are supposed to be filesystem-equivalent it sure seems like a bug to me). I'll refactor this code to avoid the use of |
@danielbachhuber This is fixed in #455. |
👌 Thanks for your help with this, @erayd |
No problem. Thanks for reporting the issue :-). I'll update this issue once the fix is merged (@bighappyface needs to do that part). It'll go to 6.0.0-dev first, then backported for v5.2.5. |
@danielbachhuber Now merged in 6.0.0-dev, and backported for 5.2.5 in #457. |
👍 Looking forward |
Created a build in wp-cli/wp-cli#4433 |
5.2.5 fixes our issue. Thanks for your help @erayd @bighappyface :) |
When updating our dependencies from 5.2.1 to 5.2.2 today, we experienced this error:
Ref wp-cli/wp-cli#4393 and https://travis-ci.org/wp-cli/wp-cli/jobs/282809129
Let me know what situational details I can provide to help reproduce it.
justinrainbow/json-schema
is a dependency of Composer, which we use within our application.The text was updated successfully, but these errors were encountered: