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

Faild to fetch style version 0.51.0 #7586

Closed
ansarikhurshid786 opened this issue Nov 13, 2018 · 11 comments
Closed

Faild to fetch style version 0.51.0 #7586

ansarikhurshid786 opened this issue Nov 13, 2018 · 11 comments

Comments

@ansarikhurshid786
Copy link

I am using mapbox since version 0.47.0. I have added custom style in json formate. it is working fine upto mapbox v 0.50.0. I have updated to 0.51.0. Now it is through error "Faild to fetch style".

@kkaefer
Copy link
Contributor

kkaefer commented Nov 13, 2018

@ansarikhurshid786 could you please describe this issue in more detail?

  • What browser version and operating system are you using?
  • Are you using Mapbox API services? Does the connection work? Is your server up?
  • Provide a reduced testcase (e.g. via JSFiddle) that exhibits this behavior
  • Post any output in the browser console, or suspicious activity in the network tab

@ansarikhurshid786
Copy link
Author

I am using ionic 3 framework. Application is running in webview in android.

Running application on file protocol. When application running http protocol then working fine.

@kkaefer
Copy link
Contributor

kkaefer commented Nov 13, 2018

What Android version are you using? Do you know what Webkit/Blink version is in use by the Webview?

I suspect that this problem may be caused by #7371

@ansarikhurshid786
Copy link
Author

I am using Android 8. web view version update.

@ansarikhurshid786
Copy link
Author

I am getting following error in console log:

polyfills.js:3 Fetch API cannot load file:///android_asset/www/assets/style.json. URL scheme "file" is not supported.

@kkaefer
Copy link
Contributor

kkaefer commented Nov 19, 2018

@ansarikhurshid786 Mapbox GL doesn't include a polyfills.js file. It sounds like you're including a polyfill in your build that replaces browser APIs with its own implementation which causes the Fetch request to fail.

@ansarikhurshid786
Copy link
Author

I am using ionic 3. Ionic 3 use polypill.

@kkaefer
Copy link
Contributor

kkaefer commented Nov 19, 2018

Well, if your framework modifies browser builtins, there's not a lot that Mapbox GL can do. Please file an issue with Ionic to fix their polyfill.

@kkaefer kkaefer closed this as completed Nov 19, 2018
@kkaefer
Copy link
Contributor

kkaefer commented Nov 19, 2018

It looks like this comment might be related: eec8cd5#commitcomment-31351193

@kkaefer kkaefer reopened this Nov 19, 2018
@gpiffault
Copy link

I didn't find this issue as it was closed but it looks related, yes. After further investigation it also breaks any asset loading (icon images etc.) in this context.

@ansarikhurshid786
Copy link
Author

Thanks. I got the solution.

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

3 participants