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

iOS Safari Console Error 'Unhandled Promise Rejection: AbortError: Fetch is aborted' #8480

Closed
nbertrand-bh opened this issue Jul 15, 2019 · 21 comments
Labels
environment-specific 🖥️ needs investigation 🔍 Issues that require further research (e.g. it's not clear whether it's GL JS or something else)

Comments

@nbertrand-bh
Copy link

mapbox-gl-js version: 1.1.0

browser: iOS Safari on iOS 12.3.1

Steps to Trigger Behavior

  1. Load up a map on iOS Safari: https://docs.mapbox.com/mapbox-gl-js/example/simple-map/
  2. Start scrolling around, pinch/zoom, etc.
  3. Error will pop up on the aborted fetch.

Link to Demonstration

https://docs.mapbox.com/mapbox-gl-js/example/simple-map/

Expected Behavior

We recently upgraded our maps from 0.53.1 to 1.1.0. Prior to our upgrade, these errors were not logging in Bugsnag. I also fired up a branch right before we upgraded and was not able to get the error to log into the console. The map continues to work normally even with these errors.

Expected behavior is for these errors to not be logged to the console.

Actual Behavior

Error is thrown into console.
This is the console from
Screen Shot 2019-07-15 at 10 47 49 AM

@ryanhamley
Copy link
Contributor

I'm having trouble recreating this error. Does it happen every time? How long does it usually take to create the error? I'm also using Safari on iOS 12.3.1.

@ryanhamley ryanhamley added environment-specific 🖥️ needs investigation 🔍 Issues that require further research (e.g. it's not clear whether it's GL JS or something else) labels Jul 15, 2019
@nbertrand-bh
Copy link
Author

It doesn't happen every time. Doing some more testing it seemed to happen more if I zoom out to US level then zoom in quickly to a new part of the map. I was just able to re-create it 7/10 times on the example simple map.

Some possible good news, I went back and checked our bugsnag and saw it was also happening on OSX safari. So I went to test it and it was very easily recreated there.

MapboxFetchError

@hulsizer
Copy link

hulsizer commented Aug 7, 2019

@ryanhamley Any update on this?

@ryanhamley
Copy link
Contributor

ryanhamley commented Aug 13, 2019

Hi @hulsizer and @nbertrand-bh thanks for your patience. I took a look at this and my initial diagnosis is that this may be related to a known Safari bug in which Fetch.abortController is implemented in Safari but doesn't actually do anything in certain versions. I'm not sure there's much we can do here but the good news is that this seems to be fairly harmless.

On second thought, this seems to be caused by fetch tasks piling up in the worker thread due to a heavy workload (rapid zooming) and apparently some of the requests are not getting cancelled correctly. It's still mostly harmless but obviously not ideal. As luck would have it though, I believe this new PR (#8633) from a member of our team fixes this issue. I tested the branch out and have so far been unable to reproduce the issue in Safari.

@nbertrand-bh
Copy link
Author

Just a heads up. We just updated to the latest version (1.6.0) and it's still showing up. Don't need to re-open it, and we're just going to permanently mute the bugsnag error for this since it does appear harmless.

@malwoodsantoro
Copy link
Contributor

Reopening this issue as I've been able to reproduce it using v1.6.0. I used a simple example (see https://jsfiddle.net/scLqt0o3/) and panned in and out very quickly several times until the error appeared.

image

Safari v13.0.4
Mapbox v1.6.1

@Plantain
Copy link

We are seeing thousands of these in the wild every day, almost all from iOS/Safari.

@jpopham
Copy link

jpopham commented Mar 2, 2020

Also getting them in Mac/Safari

@katydecorah
Copy link
Contributor

The Docs team's Sentry alerted this issue as well.

You can reproduce by zooming in and out of this map in Safari (Version 13.0.5 (15608.5.11)): https://docs.mapbox.com/studio-manual/examples/hillshade/

@erinmeyers88
Copy link

Hello, I am also experiencing this issue.

Browsers: Safari 14 on Catalina 10.15.7 and Safari on iOS 13.7

I encounter the issue when zooming in/out quickly. It seems to occur much more frequently when the hillshade layer is turned on and causes my app to freeze temporarily. Without the hillshade layer, the issue occurs less frequently and it doesn't seem to affect the user experience.

@kcoyner
Copy link

kcoyner commented Dec 30, 2020

I am also seeing this issue.

Mobile Safari 14.0.1 on iOS 14.2 and iOS 14.3.

@asheemmamoowala
Copy link
Contributor

Looks like a bug in Safari/Webkit: https://bugs.webkit.org/show_bug.cgi?id=215771

@ajbraudev
Copy link

This error is causing our entire app to reload on Safari. This is a significant issue for us. Is there a known workaround?

@themumy10
Copy link

Any updates on issue?

@richigonzalez
Copy link

Any update?

@src01001100
Copy link

Same here. This needs to be attacked.

@ulilopezpacho
Copy link

I'm also having the same problem. Any news?

@vjohnston
Copy link

+1, also facing this issue! Any updates? It seems like many people here would really appreciate a fix 🙏

@avpeery
Copy link
Contributor

avpeery commented Dec 22, 2022

@vjohnston Thanks for using Mapbox! From the previous discussion, it looks like the problem was determined to be a harmless bug caused by webkit. Can you elaborate what the error is on your end and how it's impacting your map experience? It would be a great help to include a minimal code reproduction, and include what version of GL JS you are using.

@jschaf
Copy link
Contributor

jschaf commented Apr 28, 2023

WebKit merged a PR on March 23 that closed the linked bugs.

https://bugs.webkit.org/show_bug.cgi?id=215771
https://bugs.webkit.org/show_bug.cgi?id=251463

@stepankuzmin
Copy link
Contributor

Closing the issue since it was resolved in the WebKit upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
environment-specific 🖥️ needs investigation 🔍 Issues that require further research (e.g. it's not clear whether it's GL JS or something else)
Projects
None yet
Development

No branches or pull requests