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

7.0.10 crashing on start #635

Closed
ivpusic opened this issue Jan 22, 2020 · 53 comments
Closed

7.0.10 crashing on start #635

ivpusic opened this issue Jan 22, 2020 · 53 comments
Labels
upstream the bug source is a bug in native mapbox gl

Comments

@ivpusic
Copy link

ivpusic commented Jan 22, 2020

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
@kristfal
Copy link
Member

Published 7.0.10 now. Can you try again?

@aemdy
Copy link

aemdy commented Jan 22, 2020

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

@kristfal
Copy link
Member

kristfal commented Jan 22, 2020 via email

@kristfal
Copy link
Member

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

@kristfal
Copy link
Member

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

@makozlo-airship
Copy link

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.

@jeveloper
Copy link

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

@kristfal
Copy link
Member

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.

@makozlo-airship
Copy link

@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?

@systemlevel
Copy link
Contributor

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

@cglacet
Copy link

cglacet commented Jan 24, 2020

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.

@kristfal
Copy link
Member

kristfal commented Jan 24, 2020 via email

@cglacet
Copy link

cglacet commented Jan 24, 2020

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.

@kristfal
Copy link
Member

@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.

@cglacet
Copy link

cglacet commented Jan 24, 2020

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

@makozlo-airship
Copy link

makozlo-airship commented Jan 24, 2020

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'
}

@waris117
Copy link

waris117 commented Jan 24, 2020

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

@waris117
Copy link

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

@kristfal
Copy link
Member

kristfal commented Jan 24, 2020 via email

@systemlevel
Copy link
Contributor

systemlevel commented Jan 25, 2020

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.

@kristfal
Copy link
Member

kristfal commented Jan 25, 2020

@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

@systemlevel
Copy link
Contributor

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

@makozlo-airship
Copy link

makozlo-airship commented Jan 27, 2020

@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?

@kristfal
Copy link
Member

No news from Mapbox. I’d Ideally like them to respond to mapbox/mapbox-gl-native-ios#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.

@cglacet
Copy link

cglacet commented Jan 30, 2020

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)

@kristfal
Copy link
Member

kristfal commented Jan 30, 2020

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

@makozlo-airship
Copy link

@kristfal when I try running yarn add react-native-mapbox-gl/maps@7.0.9, 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".

@kristfal
Copy link
Member

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

@makozlo-airship
Copy link

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

@kristfal
Copy link
Member

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

--> yarn add @react-native-mapbox-gl/maps@7.0.9
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/maps@7.0.9" has unmet peer dependency "prop-types@>=15.5.8".
warning " > @react-native-mapbox-gl/maps@7.0.9" has unmet peer dependency "react@^16.6.1".
warning " > @react-native-mapbox-gl/maps@7.0.9" 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/maps@7.0.9
info All dependencies
├─ @mapbox/geo-viewport@0.4.0
├─ @mapbox/sphericalmercator@1.1.0
├─ @react-native-mapbox-gl/maps@7.0.9
├─ @turf/along@6.0.1
├─ @turf/bearing@6.0.1
├─ @turf/destination@6.0.1
├─ @turf/distance@6.0.1
└─ underscore@1.9.2
✨  Done in 103.57s.

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

@makozlo-airship
Copy link

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

@joaodematejr
Copy link

+1 :(

@afomic
Copy link

afomic commented Feb 6, 2020

@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

@Vednus
Copy link

Vednus commented Feb 9, 2020

@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.

@makozlo-airship
Copy link

makozlo-airship commented Feb 10, 2020

@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?

@savv
Copy link
Contributor

savv commented Feb 11, 2020

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.

@savv
Copy link
Contributor

savv commented Feb 11, 2020

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.

@mosef
Copy link

mosef commented Feb 19, 2020

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

@systemlevel
Copy link
Contributor

systemlevel commented Feb 19, 2020

Looks like there was some activity from Mapbox here: mapbox/mapbox-gl-native-ios#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.

@ShaharyarMaroof
Copy link

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?

@mfazekas
Copy link
Contributor

mfazekas commented Feb 20, 2020

@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

@ShaharyarMaroof
Copy link

ShaharyarMaroof commented Feb 20, 2020

@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.

@ShaharyarMaroof
Copy link

@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.

@mfazekas mfazekas added the upstream the bug source is a bug in native mapbox gl label Feb 21, 2020
@yacineblr
Copy link

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

@TasosTsaou
Copy link

TasosTsaou commented Mar 7, 2020

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

@makozlo-airship
Copy link

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

@ShaharyarMaroof
Copy link

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

@ferdicus
Copy link
Member

ferdicus commented Mar 9, 2020

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

@kk12837
Copy link

kk12837 commented Mar 10, 2020

Any updates?

It still crashes on start on real iPhone.

@mfazekas
Copy link
Contributor

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

@kk12837
Copy link

kk12837 commented Mar 11, 2020

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

on real devices?

@ShaharyarMaroof
Copy link

@kk12837 yes.

@mfazekas
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream the bug source is a bug in native mapbox gl
Projects
None yet
Development

No branches or pull requests