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

[Bug]: Crash on startup for Library not loaded: @rpath/OneSignalCore.framework/OneSignalCore #1227

Closed
1 task done
peterpaulis opened this issue Feb 14, 2023 · 14 comments
Closed
1 task done

Comments

@peterpaulis
Copy link

peterpaulis commented Feb 14, 2023

What happened?

updated pods, the app crashes during launch on

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

tried Clean and

rm Podfile.lock
pod cache clean --all
pod install --repo-update

Steps to reproduce?

1. pod update
2. clean, build and run on real device

What did you expect to happen?

  • that i can run on device

OneSignal iOS SDK version

OneSignalXCFramework 3.12.3

iOS version

15

Specific iOS version

iOS 16.2, XCode Version 14.2 (14C18)

Relevant log output

dyld[78163]: Library not loaded: @rpath/OneSignalCore.framework/OneSignalCore
  Referenced from: <A32B474F-9332-3CED-90EB-2D2361F63724> /private/var/containers/Bundle/Application/251D6108-2592-44AC-8CE9-175B0F1763CF/DennikN.app/DennikN
  Reason: tried: '/usr/lib/swift/OneSignalCore.framework/OneSignalCore' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalCore.framework/OneSignalCore' (errno=2), '/usr/lib/swift/OneSignalCore.framework/OneSignalCore' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalCore.framework/OneSignalCore' (errno=2), '/private/var/containers/Bundle/Application/251D6108-2592-44AC-8CE9-175B0F1763CF/DennikN.app/Frameworks/OneSignalCore.framework/OneSignalCore' (errno=2), '/private/var/containers/Bundle/Application/251D6108-2592-44AC-8CE9-175B0F1763CF/DennikN.app/Frameworks/OneSignalCore.framework/OneSignalCore' (errno=2), '/private/var/containers/Bundle/Application/251D6108-2592-44AC-8CE9-175B0F1763CF/DennikN.app/Frameworks/OneSignalCore.framework/OneSignalCore' (errno=2), '/usr/lib/swift/OneSignalCore.framework/OneSignalCore' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalCore.framework/OneSignalCore' (errno=2), '/usr/lib/swift/OneSignalCore.framework/OneSignalCore' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalCore.framework/OneSignalCore' (errno=2), '/private/var/containers/Bundle/Application/251D6108-2592-44AC-8CE9-175B0F1763CF/DennikN.app/Frameworks/OneSignalCore.framework/OneSignalCore' (errno=2), '/private/var/containers/Bundle/Application/251D6108-2592-44AC-8CE9-175B0F1763CF/DennikN.app/Frameworks/OneSignalCore.framework/OneSignalCore' (errno=2), '/private/var/containers/Bundle/Application/251D6108-2592-44AC-8CE9-175B0F1763CF/DennikN.app/Frameworks/OneSignalCore.framework/OneSignalCore' (errno=2), '/private/preboot/Cryptexes/OS@rpath/OneSignalCore.framework/OneSignalCore' (errno=2), '/usr/lib/swift/OneSignalCore.framework/OneSignalCore' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalCore.framework/OneSignalCore' (errno=2), '/usr/lib/swift/OneSignalCore.framework/OneSignalCore' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalCore.framework/OneSignalCore' (errno=2), '/private/var/containers/Bundle/Application/251D6108-2592-44AC-8CE9-175B0F1763CF/DennikN.app/Frameworks/OneSignalCore.framework/OneSignalCore' (errno=2), '/private/var/containers/Bundle/Application/251D6108-2592-44AC-8CE9-175B0F1763CF/DennikN.app/Frameworks/OneSignalCore.framework/OneSignalCore' (errno=2), '/private/var/containers/Bundle/Application/251D6108-2592-44AC-8CE9-175B0F1763CF/DennikN.app/Frameworks/OneSignalCore.framework/OneSignalCore' (errno=2), '/usr/lib/swift/OneSignalCore.framework/OneSignalCore' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalCore.framework/OneSignalCore' (errno=2), '/usr/lib/swift/OneSignalCore.framework/OneSignalCore' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalCore.framework/OneSignalCore' (errno=2), '/private/var/containers/Bundle/Application/251D6108-2592-44AC-8CE9-175B0F1763CF/DennikN.app/Frameworks/OneSignalCore.framework/OneSignalCore' (errno=2), '/private/var/containers/Bundle/Application/251D6108-2592-44AC-8CE9-175B0F1763CF/DennikN.app/Frameworks/OneSignalCore.framework/OneSignalCore' (errno=2), '/private/var/containers/Bundle/Application/251D6108-2592-44AC-8CE9-175B0F1763CF/DennikN.app/Frameworks/OneSignalCore.framework/OneSignalCore' (errno=2), '/System/Library/Frameworks/OneSignalCore.framework/OneSignalCore' (errno=2, not in dyld cache)
Library not loaded: @rpath/OneSignalCore.framework/OneSignalCore
  Referenced from: <A32B474F-9332-3CED-90EB-2D2361F63724> /private/var/containers/Bundle/Application/251D6108-2592-44AC-8CE9-175B0F1763CF/DennikN.app/DennikN
  Reason: tried: '/usr/lib/swift/OneSignalCore.framework/OneSignalCore' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalCore.framework/OneSignalCore' (errno=2), '/usr/lib/swift/OneSignalCore.framework/OneSignalCore' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalCore.framework/OneSignalCore' (errno=2), '/private/var/containers/Bundle/Application/251D6108-2592-44AC-8CE9-175B0F1763CF/DennikN.app/Frameworks/OneSignalCore.framework/OneSignalCore' (errno=2), '/private/var/containers/Bundle/Application/251D6108-2592-44AC-8CE9-175B0F1763CF/DennikN.app/Frameworks/OneSignalCore.framework/OneSignalCore' (errno=2), '/private/var/containers/Bundle/Application/251D6108-2592-44AC-8CE9-175B0F1763CF/DennikN.app/Frameworks/OneSignalCo
dyld config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/usr/lib/libBacktraceRecording.dylib:/usr/lib/libMainThreadChecker.dylib:/usr/lib/libRPAC.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
(lldb)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@peterpaulis
Copy link
Author

my pod

platform :ios, '13.0'
inhibit_all_warnings!

def app_pods
  
  use_frameworks!

  # SDKs
  pod 'OneSignalXCFramework'
....

@emawby
Copy link
Contributor

emawby commented Feb 15, 2023

Hello thank you for reaching out. We have seen this error in some of our wrapper SDKs maybe those threads will help.

Make sure you are using Cocoapods 1.11.3 and try the below code after update. We have seen this issue when using versions lower than 1.11.3.
Also, make sure you are using ruby 2.7.5+. We believe Cocoapods 1.11.3 has an FFI dependency that requires a higher ruby version than what you may be using.

rm Podfile.lock
pod cache clean --all
pod install --repo-update

@anatoly-spb
Copy link

anatoly-spb commented Feb 27, 2023

The same issue when run project from xcode:

image

Out project is based on cordova with onesignal-cordova-plugin 3.3.0 :

+ ionic info

Ionic:

   Ionic CLI                     : 6.20.8 (/Users/jenkins/jenkins_slave/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/node16.19.0/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 6.5.4
   @angular-devkit/build-angular : 15.1.6
   @angular-devkit/schematics    : 15.1.6
   @angular/cli                  : 15.1.6
   @ionic/angular-toolkit        : 8.0.0

Cordova:

   Cordova CLI       : 11.1.0
   Cordova Platforms : ios 6.2.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 7 other plugins)

Utility:

   cordova-res : 0.15.4
   native-run  : 1.7.1

System:

   ios-deploy : 1.11.4
   ios-sim    : 8.0.2
   NodeJS     : v16.19.0 (/Users/jenkins/jenkins_slave/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/node16.19.0/bin/node)
   npm        : 8.19.3
   OS         : macOS Monterey
   Xcode      : Xcode 14.2 Build version 14C18

Podfile:

# DO NOT MODIFY -- auto-generated by Apache Cordova
source 'https://cdn.cocoapods.org/'
platform :ios, '11.0'
use_frameworks!
target 'rda' do
	project 'rda.xcodeproj'
	pod 'OneSignalXCFramework', '3.12.3'
end

Podfile.lock:

PODS:
  - OneSignalXCFramework (3.12.3):
    - OneSignalXCFramework/OneSignalCore (= 3.12.3)
    - OneSignalXCFramework/OneSignalExtension (= 3.12.3)
    - OneSignalXCFramework/OneSignalOutcomes (= 3.12.3)
  - OneSignalXCFramework/OneSignalCore (3.12.3)
  - OneSignalXCFramework/OneSignalExtension (3.12.3):
    - OneSignalXCFramework/OneSignalCore
    - OneSignalXCFramework/OneSignalOutcomes
  - OneSignalXCFramework/OneSignalOutcomes (3.12.3):
    - OneSignalXCFramework/OneSignalCore

DEPENDENCIES:
  - OneSignalXCFramework (= 3.12.3)

SPEC REPOS:
  trunk:
    - OneSignalXCFramework

SPEC CHECKSUMS:
  OneSignalXCFramework: 75844c29607ca95e6176f6f21257b4382c7fdbfb

PODFILE CHECKSUM: 6fa501b03e19ac918fe9af923be039d6e8cfdea3

COCOAPODS: 1.11.3

System:

#system ruby:
>/usr/bin/ruby --version
ruby 2.6.10p210
#user ruby installed with rbenv and selected with rbenv global 3.2.1 command
>ruby --version
ruby 3.2.1 (2023-02-08...)
>pod --version
1.11.3

Steps to reproduce:

>install nodejs 16.9
>npm install -g [email protected] [email protected] [email protected] @ionic/[email protected]
>git clone https://github.com/anatoly-spb/ionic6-hello.git
>cd ionic6-hello
>node install 
>ionic cordova platforms add [email protected]
>cd platforms/ios
>pod repo update
>pod install
>cd ../..
>ionic cordova build ios
open workspace from platforms/ios in xcode and try to run simulator

Any hints are welcome! Thank you!

@anatoly-spb
Copy link

anatoly-spb commented Mar 1, 2023

I have downgraded to [email protected] with 'OneSignalXCFramework', '3.11.2' and it solved the problem. So the problem is between 3.11.2 and 3.12.3 versions of OneSignalXCFramework.

@nan-li
Copy link
Contributor

nan-li commented Mar 7, 2023

Hi @anatoly-spb,
Thanks for reporting. I see:

#system ruby:
>/usr/bin/ruby --version
ruby 2.6.10p210
#user ruby installed with rbenv and selected with rbenv global 3.2.1 command
>ruby --version
ruby 3.2.1 (2023-02-08...)

I suspect the ruby version that is is actually used to build may be the system ruby 2.6.10p210. We have seen this crash resolve for most once they use Cocoapods 1.11.3 and ruby 2.7.5+.

Can you confirm, or make sure xcode is indeed using ruby 3.2.1?

@anatoly-spb
Copy link

anatoly-spb commented Mar 7, 2023

Hi @anatoly-spb,
Thanks for reporting. I see:

#system ruby:
>/usr/bin/ruby --version
ruby 2.6.10p210
#user ruby installed with rbenv and selected with rbenv global 3.2.1 command
>ruby --version
ruby 3.2.1 (2023-02-08...)

I suspect the ruby version that is is actually used to build may be the system ruby 2.6.10p210. We have seen this crash resolve for most once they use Cocoapods 1.11.3 and ruby 2.7.5+.

Can you confirm, or make sure xcode is indeed using ruby 3.2.1?

If xcode uses user's profile, so it must be ruby 3.2.1. Could you please point me how to check it?

Another question is how do you explain that downgrade to previous version solve this problem? It seems to me something wrong is between 3.11 and 3.12 versions.

@emawby
Copy link
Contributor

emawby commented Mar 23, 2023

@anatoly-spb We have not been able to reproduce the issue going between 3.11 -> 3.12 with Ruby 3.2.1, but I noticed that a Cocoapods update was released and it explicitly requires a higher Ruby version. You could try updating Cocoapods.

@KhurramIqbal87
Copy link

KhurramIqbal87 commented Apr 10, 2023

@anatoly-spb @peterpaulis @nan-li @emawby
The issue is related. it expect One Signal XC Frameworks in debug-iPhoneSimulator where as it creates one more folder for OneSignalXCFramework and paste all dyld under that folder as a resultant dyld not found in Debug-iPhoneSImulator. so copy paste all the folder in Debug iPhoneSimulator

Attach is the screen shot
Screenshot 2023-04-11 at 3 01 14 AM

Copy all the folder under OneSingalXCFramework and paste it Debug-iPhoneSimulator

What I believe it is releated to Cocoapod version or may be not. I Faced the same issue on other project on our Company own framework while one of the other colleague was not facing such issue.

@emawby
Copy link
Contributor

emawby commented Apr 11, 2023

@KhurramIqbal87 Ah good find that is good to know! Have you tested on the 1.12.+ version of Cocoapods? Cocoapods had not released an update for almost a year but finally did and should have better support for the latest Xcode version.

@ahmedsafadii
Copy link

SAME ISSUE WITH SPM

@emawby
Copy link
Contributor

emawby commented Apr 12, 2023

@ahmedsafadii Hello do you have an example project with SPM that can reproduce this issue? I have not been able to reproduce this issue using SPM. Which Xcode version are you using?

@ahmedsafadii
Copy link

@ahmedsafadii Hello do you have an example project with SPM that can reproduce this issue? I have not been able to reproduce this issue using SPM. Which Xcode version are you using?

Version 14.2 (14C18)

@KarimSakr
Copy link

SAME ISSUE WITH SPM

same

@nan-li
Copy link
Contributor

nan-li commented Oct 24, 2024

Hi, we have had no further reports of this. Please upgrade the OneSignal SDK if you or anyone is still having this issue. If this is still an issue, please open a new report with updated information.

@nan-li nan-li closed this as completed Oct 24, 2024
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

7 participants