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 JSON descriptors from the network fails in the light library #1107

Open
KDogOfCode opened this issue Aug 26, 2018 · 0 comments · May be fixed by #1942
Open

Loading JSON descriptors from the network fails in the light library #1107

KDogOfCode opened this issue Aug 26, 2018 · 0 comments · May be fixed by #1942

Comments

@KDogOfCode
Copy link

protobuf.js version: 6.8.8

I'm loading JSON descriptors from a network location. An exception is thrown when using the light library, but if I switch to the full library then it works.

After debugging in the browser it seems that the common variable is not being set in the light library if loading from a network location. This causes it to fail on line 4174.

Here is the console log...

protobuf_light.js:4174 Uncaught (in promise) TypeError: Cannot use 'in' operator to search for '/content/geobuf.json' in undefined
    at fetch (protobuf_light.js:4174)
    at Root.load (protobuf_light.js:4225)
    at executor (protobuf_light.js:84)
    at new Promise (<anonymous>)
    at Object.asPromise (protobuf_light.js:68)
    at Root.load (protobuf_light.js:4113)
    at Object.load (protobuf_light.js:2200)

Thanks

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

Successfully merging a pull request may close this issue.

1 participant