Maps: 7.0.10 crashing on start

Created on 22 Jan 2020  Β·  53Comments  Β·  Source: react-native-mapbox-gl/maps

Describe the bug

app crashes on start

 Library not loaded: @rpath/MapboxMobileEvents.framework/MapboxMobileEvents

To Reproduce

install version 7.0.10 and try to start the app

Expected behavior

does not crash

Versions (please complete the following information):

  • Platfrom: iOS
  • Device: iPhone 11
  • React Native Version: 0.61
upstream

Most helpful comment

The interim solution if you can't use use_frameworks! is npm install --save @react-native-mapbox-gl/[email protected] / yarn add @react-native-mapbox-gl/[email protected]

All 53 comments

Published 7.0.10 now. Can you try again?

The same issue. It is version 7.0.10 that is crashing the app immediately after it is launched.

Likely root cause at
https://github.com/mapbox/mapbox-gl-native-ios/issues/131

We’ll need to update download path and republish. I’ll do it tonight.

On Wed, 22 Jan 2020 at 17:39, Karolis JanuΕ‘kas notifications@github.com
wrote:

The same issue. It is version 7.0.10 that is crashing the app immediately
after it is launched.

β€”
You are receiving this because you commented.

Reply to this email directly, view it on GitHub
https://github.com/react-native-mapbox-gl/maps/issues/635?email_source=notifications&email_token=ABLAPWZWXJSCT7Z6AOKXZN3Q7BZEJA5CNFSM4KKINBM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJUIFAY#issuecomment-577274499,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABLAPW2NMIALBQY3O6O6NIDQ7BZEJANCNFSM4KKINBMQ
.

Ok, that was a bigger issue than expected. I think I fixed it.

Can you try https://github.com/react-native-mapbox-gl/maps/pull/637 ?

To install it, do yarn add https://github.com/react-native-mapbox-gl/maps.git#update-ios-framework

Merged this into master, you can install by yarn add https://github.com/react-native-mapbox-gl/maps.git

I'm also having the crash-on-start issue using 7.2.0.

Steps to reproduce:

  1. run yarn add @react-native-mapbox-gl/maps
  2. run the project from Xcode
  3. get an abort with payload error in Xcode that won't allow the build to continute running.

@makozlo-airship Is this still happening for you? Or figure it out.

Make sure you unlink existing FW and use pods to install the new version @makozlo-airship

Please try that and get back to me if the issue persists.

@kristfal I did a clean install...I think I might be confused about installation. I'm using RN version 0.61.5 - I shouldn't have to do anything other than yarn add @react-native-mapbox-gl/maps, right?

@makozlo-airship did you also pod install In your iOS directory?

I have the same issue (app crashing on start) with the following error:

dyld: Library not loaded: @rpath/MapboxMobileEvents.framework/MapboxMobileEvents
  Referenced from: /Users/cglacet/Library/Developer/CoreSimulator/Devices/7CBB4959-C16B-4A17-BA68-7BBE7A046BBE/data/Containers/Bundle/Application/724057ED-70A3-49DB-A407-7014EA21EA80/AppName.app/Frameworks/Mapbox.framework/Mapbox
  Reason: image not found

My dependencies are:

"@react-native-mapbox-gl/maps": "^7.0.10",
"@mapbox/geo-viewport": "^0.2.2",
"@mapbox/mapbox-sdk": "^0.6.0",
"@mapbox/polyline": "^1.0.0",

My config is the following:

$ npx react-native info
System:
    OS: macOS Mojave 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 88.09 MB / 16.00 GB
    Shell: 5.7.1 - /usr/local/bin/zsh
  Binaries:
    Node: 12.14.1 - /usr/local/bin/node
    Yarn: 1.3.2 - /usr/local/bin/yarn
    npm: 6.13.4 - /usr/local/bin/npm
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5977832
    Xcode: 11.3/11C29 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0
    react-native: 0.61.5 => 0.61.5

I ran both npm install and pod install without any error showing up.

Please update to 7.2.0 and redo installation. Does it work now?

On Fri, 24 Jan 2020 at 10:10, Christian glacet notifications@github.com
wrote:

I have the same issue (app crashing on start) with the following error:

dyld: Library not loaded: @rpath/MapboxMobileEvents.framework/MapboxMobileEvents
Referenced from: /Users/cglacet/Library/Developer/CoreSimulator/Devices/7CBB4959-C16B-4A17-BA68-7BBE7A046BBE/data/Containers/Bundle/Application/724057ED-70A3-49DB-A407-7014EA21EA80/AppName.app/Frameworks/Mapbox.framework/Mapbox
Reason: image not found

My dependencies are:

"@react-native-mapbox-gl/maps": "^7.0.10","@mapbox/geo-viewport": "^0.2.2","@mapbox/mapbox-sdk": "^0.6.0","@mapbox/polyline": "^1.0.0",

My config is the following:

$ npx react-native info
System:
OS: macOS Mojave 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Memory: 88.09 MB / 16.00 GB
Shell: 5.7.1 - /usr/local/bin/zsh
Binaries:
Node: 12.14.1 - /usr/local/bin/node
Yarn: 1.3.2 - /usr/local/bin/yarn
npm: 6.13.4 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5977832
Xcode: 11.3/11C29 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5

I ran both npm install and pod install without any error showing up.

β€”
You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/react-native-mapbox-gl/maps/issues/635?email_source=notifications&email_token=ABLAPW6YNLX43KGJPGJLLFLQ7KWBTA5CNFSM4KKINBM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ2FLNA#issuecomment-578049460,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABLAPW6YBP2WI2G5MKSEAQDQ7KWBTANCNFSM4KKINBMQ
.

Currently trying it, so far I've ran:

$ yarn add https://github.com/react-native-mapbox-gl/maps.git#update-ios-framework
$ cd ios 
$ pod install
...
Installing Mapbox-iOS-SDK (5.6.1)
Installing MapboxMobileEvents (0.10.2)
Installing react-native-mapbox-gl 7.2.0 (was 7.0.10)
...

For now I still have the same error message when running from xcode.

@cglacet can you try to run the example? Eg:

1) Clone repo
2) cd example && yarn && cd ios && pod install
3) Build Xcode

If this work, and your project doesn't, it is likely because the old Mapbox.framework is still referenced in your project. You need to make sure you properly unlink it before you add it again.

I tried to install the example, but yarn hangs (more than 2 hours):

npm notice === Tarball Details ===
npm notice name:          @react-native-mapbox-gl/maps
npm notice version:       7.2.0
npm notice filename:      react-native-mapbox-gl-maps-7.2.0.tgz
...
Renaming react-native-mapbox-gl-maps-7.2.0.tgz
[1/4] πŸ”  Resolving packages...
β‘€ @react-native-mapbox-gl/maps@file:../react-native-mapbox-gl-maps.tgz

To be a bit more specific:

...
verbose 4.754651429 Performing "GET" request to "https://registry.yarnpkg.com/is-arrayish".
verbose 4.755403872 Request "https://registry.yarnpkg.com/json-parse-better-errors" finished with status code 200.
verbose 4.78170132 Request "https://registry.yarnpkg.com/p-try" finished with status code 200.
verbose 4.784226002 Request "https://registry.yarnpkg.com/is-arrayish" finished with status code 200.
verbose 4.851386865 Request "https://registry.yarnpkg.com/@mapbox%2ffusspot" finished with status code 200.
verbose 4.897487246 Request "https://registry.yarnpkg.com/@mapbox%2fparse-mapbox-token" finished with status code 200.
verbose 4.898679589 Performing "GET" request to "https://registry.yarnpkg.com/base-64".
verbose 4.927952432 Request "https://registry.yarnpkg.com/base-64" finished with status code 200.
⠐ @react-native-mapbox-gl/maps@file:../react-native-mapbox-gl-maps.tgz

I just tried running the example project and yarn is hanging for me as well:

[1/4] πŸ”  Resolving packages...
success Already up-to-date.
$ node ./scripts/set_access_token.js && jetifier
internal/fs/utils.js:220
    throw err;
    ^

Error: ENOENT: no such file or directory, open 'accesstoken'
    at Object.openSync (fs.js:440:3)
    at Object.readFileSync (fs.js:342:35)
    at Object.<anonymous> (/Users/makozlo/Desktop/maps/example/scripts/set_access_token.js:4:24)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)
    at internal/main/run_main_module.js:17:11 {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: 'accesstoken'
}

same issue i am also facing in "@react-native-mapbox-gl/maps": "^7.2.0", app crashes on start

dyld: Library not loaded: @rpath/MapboxMobileEvents.framework/MapboxMobileEvents

/Frameworks/Mapbox.framework/Mapbox
Reason: image not found

adding use_frameworks!, solves crash on launch but it cause issue for other pods

Good to hear it doesn’t crash.

Unfortunately Mapbox native iOS SDK now require use_frameworks, so there is
no way around it with pods afaik.

On Fri, 24 Jan 2020 at 19:02, waris117 notifications@github.com wrote:

adding use_frameworks!, solves crash on launch but it cause issue for
other pods

β€”
You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/react-native-mapbox-gl/maps/issues/635?email_source=notifications&email_token=ABLAPW4V33Q4V6S742E2PJDQ7MUJDA5CNFSM4KKINBM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ3TANI#issuecomment-578236469,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABLAPW43H2ALKGR5SHTS2ALQ7MUJDANCNFSM4KKINBMQ
.

Getting the same thing after upgrading to 7.2.0:

/Frameworks/Mapbox.framework/Mapbox
Reason: image not found

The use_frameworks! situation is very problematic for many applications including ours. We cannot use many of the most popular libraries from Google including Crashlytics, Analytics, etc. etc. when we have use_frameworks! in the podfile.

If this is required to use the new pod version of Mapbox SDK for iOS than I'm really concerned about how to make this work properly moving forward.

@systemlevel yeh, I totally get that.

While it is an option, I'm not super stoked about going back to downloading the precompiled framework. The use_frameworks! requirement is a choice made by Mapbox upstream (as I see you noticed), and I hope they can provide a good pod-based experience that we can follow. I'd say we should do the following:

1) Ask Mapbox to not require use_frameworks! and see if they can get out a change quickly
2) If option 1 doesn't happen shortly, I'll reverse back from pods to a static framework

@kristfal Thank you! And thank you for the efforts in bringing the cocoapods over. That sounds like a great plan moving forward.

@kristfal I was having issues with the use_frameworks! requirement as well (caused by other libraries I have installed), has there been any update on whether that will be required moving forward?

No news from Mapbox. I’d Ideally like them to respond to https://github.com/mapbox/mapbox-gl-native-ios/issues/154 before we make a move. I suggest you subscribe to that ticket if you want to follow this.

If I don’t hear anything by next week, I’ll get the workaround in place.

In the meantime, how could we (as end users) revert to previous version of the iOS SDK? Is it sufficient to rollback to a different version of react-native-mapbox-gl/maps? Which one? It looks like version 7.0.9 is fine (it installs iOS SDK version 5.5.0)

The interim solution if you can't use use_frameworks! is npm install --save @react-native-mapbox-gl/[email protected] / yarn add @react-native-mapbox-gl/[email protected]

@kristfal when I try running yarn add react-native-mapbox-gl/[email protected], I get the following:

An unexpected error occurred: "https://registry.yarnpkg.com/react-native-mapbox-gl%2fmaps: Request \"https://registry.yarnpkg.com/react-native-mapbox-gl%2fmaps\" returned a 405".

Forgot to add the @ before the install path. Updated code should work.

@kristfal Just tried again, not working. Will your change take a few minutes to become available?

No, there is no delay. This works on my end:

--> yarn add @react-native-mapbox-gl/[email protected]
yarn add v1.21.1
info No lockfile found.
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
warning " > @react-native-mapbox-gl/[email protected]" has unmet peer dependency "prop-types@>=15.5.8".
warning " > @react-native-mapbox-gl/[email protected]" has unmet peer dependency "react@^16.6.1".
warning " > @react-native-mapbox-gl/[email protected]" has unmet peer dependency "react-native@>=0.57.6".
[4/4] πŸ”¨  Building fresh packages...
success Saved lockfile.
success Saved 8 new dependencies.
info Direct dependencies
└─ @react-native-mapbox-gl/[email protected]
info All dependencies
β”œβ”€ @mapbox/[email protected]
β”œβ”€ @mapbox/[email protected]
β”œβ”€ @react-native-mapbox-gl/[email protected]
β”œβ”€ @turf/[email protected]
β”œβ”€ @turf/[email protected]
β”œβ”€ @turf/[email protected]
β”œβ”€ @turf/[email protected]
└─ [email protected]
✨  Done in 103.57s.

If you get a different result, check your network connection, cache etc.

Weird. Just ran it again and it installed fine. Thanks!

+1 :(

@kristfal I tried the new version(7.0.9) on android and i was getting this crash

java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:738) at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:591) at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:529) at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:484) at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20) at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:27) at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:949) at java.lang.Thread.run(Thread.java:760)

react-native version: 0.61.5

@afomic I had to go back to 7.0.8 to get things working on android. I forgot what the issue that 7.0.9 caused on Android, but there was something. I think it was hermes related.

@kristfal I've been following this thread for a while (as well as issue #154), and haven't seen any updates. I know you mentioned you would implement a workaround if you didn't hear back from Mapbox after a week or so, do you still have plans to do this?

I tried to go for 7.0.10. I thought it might work, because the first mention of the new SDK in iOS was for 7.2.0, here:
https://github.com/react-native-mapbox-gl/maps/releases

Alas, 7.0.9 is the max version I can get to work without use_frameworks.

I forked this branch at the point where the Android SDK was updated to 8.6.1, and then reverted the iOS SDK back to 5.5.0. In case you want to install that too:
yarn add https://github.com/savv/maps.git#063fa06e36a31985f972fc56a860edb1778ad78b

With the code above, I was able to get the app to start on both iOS and Android.

This is still happening, has anyone figured out a fix?
(I've tried @savv 's solution but still no dice)

Looks like there was some activity from Mapbox here: https://github.com/mapbox/mapbox-gl-native-ios/issues/154. @julianrex is indicating no short-term action will be taken on use_frameworks issue. Wondering what the community's thoughts are on a path forward?

There continues to be many valuable contributions to this library we'd love to test and include but we have to hold back for the time being.

Hey, I just updated to 7.0.10 and I am getting the following error:
image

I have the path to the pod for mapbox added to my Podfile. I removed my Pods folder and reinstalled the pods, but still getting this error. The pods installation was succesful.
Any idea why I am getting this?

~@ShaharyarMaroof there is an npm script that fetches the mapbox frmework into node_modules, it's likely that has failed~ I was wrong we're now using cocoapods

@mfazekas so how should I fix this? I can't use_frameworks! as my react-native version is below 0.61 currently.

As @ferdicus suggested here #666 I should update to 7.0.10 to resolve android breaking change.

@mfazekas got it fixed by reinstalling the node module, but now Im also getting the @rpath/MapboxMobileEvents.framework/MapboxMobileEvents error. So I think I should revert to 7.0.9 then.

I have same error with 7.2.0 version, have you found a solution please?

Any news on this guys? 7.2.0 is still crashing on startup

Having the same issue with 7.2.0 here. Crashes on startup on Android.

I reverted to 7.0.9 to get it work on both platforms.

To everyone having issues with Android, could you please try to reproduce on /example?

Any updates?

It still crashes on start on real iPhone.

There is PR #714 which offers a workaround for use_frameworks! please test. But it will not solve other issues in this thread.

I reverted to 7.0.9 to get it work on both platforms.

on real devices?

@kk12837 yes.

I'm closing this as there are multiple issues here.
8.0.0 can be used without use_frameworks! see #714

Was this page helpful?
0 / 5 - 0 ratings

Related issues

calypsow777 picture calypsow777  Β·  5Comments

fvieira picture fvieira  Β·  4Comments

SethArchambault picture SethArchambault  Β·  3Comments

atomheartother picture atomheartother  Β·  3Comments

dorthwein picture dorthwein  Β·  3Comments