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]: iOS app gets crashed (Release 3.4.2) #613

Closed
1 of 2 tasks
devmuaz opened this issue Nov 8, 2022 · 21 comments
Closed
1 of 2 tasks

[Bug]: iOS app gets crashed (Release 3.4.2) #613

devmuaz opened this issue Nov 8, 2022 · 21 comments

Comments

@devmuaz
Copy link

devmuaz commented Nov 8, 2022

What happened?

The latest version v3.4.2 causes a memory crash on iOS and was unable to run the application properly until I downgraded the version back to v3.4.1 and worked just fine.

Steps to reproduce?

1. Create new flutter app
2. Add the `onesignal_flutter` package
3. Setup the notifications steps on iOS
4. Run the app and will cause a crash

What did you expect to happen?

It should run correctly as it supposed to be

OneSignal Flutter SDK version

Release 3.4.2

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

I got these memory logs

dyld`:
    0x1d7e9aeb4 <+0>:  mov    x16, #0x209
    0x1d7e9aeb8 <+4>:  svc    #0x80
->  0x1d7e9aebc <+8>:  b.lo   0x1d7e9aedc               ; <+40>
    0x1d7e9aec0 <+12>: pacibsp 
    0x1d7e9aec4 <+16>: stp    x29, x30, [sp, #-0x10]!
    0x1d7e9aec8 <+20>: mov    x29, sp
    0x1d7e9aecc <+24>: bl     0x1d7e3771c               ; cerror_nocancel
    0x1d7e9aed0 <+28>: mov    sp, x29
    0x1d7e9aed4 <+32>: ldp    x29, x30, [sp], #0x10
    0x1d7e9aed8 <+36>: retab  
    0x1d7e9aedc <+40>: ret    

And also I got these output logs

dyld[6658]: Library not loaded: @rpath/OneSignalExtension.framework/OneSignalExtension
  Referenced from: <61C646E0-5484-305B-AB3F-AF0BA1884A80> /private/var/containers/Bundle/Application/F250D454-D344-45FF-B635-C45AFA5B3659/Runner.app/Runner
  Reason: tried: '/usr/lib/swift/OneSignalExtension.framework/OneSignalExtension' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/usr/lib/swift/OneSignalExtension.framework/OneSignalExtension' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/private/var/containers/Bundle/Application/F250D454-D344-45FF-B635-C45AFA5B3659/Runner.app/Frameworks/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/private/var/containers/Bundle/Application/F250D454-D344-45FF-B635-C45AFA5B3659/Runner.app/Frameworks/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/private/var/containers/Bundle/Application/F250D454-D344-45FF-B635-C45AFA5B3659/Runner.app/Frameworks/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/usr/lib/swift/OneSignalExtension.framework/OneSignalExtension' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/usr/lib/swift/OneSignalExtension.framework/OneSignalExtension' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/private/var/containers/Bundle/Application/F250D454-D344-45FF-B635-C45AFA5B3659/Runner.app/Frameworks/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/private/var/containers/Bundle/Application/F250D454-D344-45FF-B635-C45AFA5B3659/Runner.app/Frameworks/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/private/var/containers/Bundle/Application/F250D454-D344-45FF-B635-C45AFA5B3659/Runner.app/Frameworks/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/private/preboot/Cryptexes/OS@rpath/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/usr/lib/swift/OneSignalExtension.framework/OneSignalExtension' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/usr/lib/swift/OneSignalExtension.framework/OneSignalExtension' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/private/var/containers/Bundle/Application/F250D454-D344-45FF-B635-C45AFA5B3659/Runner.app/Frameworks/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/private/var/containers/Bundle/Application/F250D454-D344-45FF-B635-C45AFA5B3659/Runner.app/Frameworks/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/private/var/containers/Bundle/Application/F250D454-D344-45FF-B635-C45AFA5B3659/Runner.app/Frameworks/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/usr/lib/swift/OneSignalExtension.framework/OneSignalExtension' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/usr/lib/swift/OneSignalExtension.framework/OneSignalExtension' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/private/var/containers/Bundle/Application/F250D454-D344-45FF-B635-C45AFA5B3659/Runner.app/Frameworks/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/private/var/containers/Bundle/Application/F250D454-D344-45FF-B635-C45AFA5B3659/Runner.app/Frameworks/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/private/var/containers/Bundle/Application/F250D454-D344-45FF-B635-C45AFA5B3659/Runner.app/Frameworks/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/System/Library/Frameworks/OneSignalExtension.framework/OneSignalExtension' (errno=2, not in dyld cache)
Library not loaded: @rpath/OneSignalExtension.framework/OneSignalExtension
  Referenced from: <61C646E0-5484-305B-AB3F-AF0BA1884A80> /private/var/containers/Bundle/Application/F250D454-D344-45FF-B635-C45AFA5B3659/Runner.app/Runner
  Reason: tried: '/usr/lib/swift/OneSignalExtension.framework/OneSignalExtension' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/usr/lib/swift/OneSignalExtension.framework/OneSignalExtension' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/private/var/containers/Bundle/Application/F250D454-D344-45FF-B635-C45AFA5B3659/Runner.app/Frameworks/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/private/var/containers/Bundle/Application/F250D454-D344-45FF-B635-C45AFA5B3659/Runner.app/Frameworks/OneSignalExtension.framework/OneSignalExtension' (errno=2), '/private/var/containers/Bundle/Application/F250D
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

- [X] I agree to follow this project's Code of Conduct

<!-- probot = {"onesignal-probot":{"response_time_in_business_days":114}} -->
@aamirki
Copy link

aamirki commented Nov 11, 2022

Possibly a duplicate of #608. I am running into this as well

@chrisvidal
Copy link

running into the same weird log during the crash on iOS with 3.4.2

@devmuaz
Copy link
Author

devmuaz commented Nov 22, 2022

@chrisvidal for now, you can use the previous stable version 3.4.1 which works just fine.

@chrisvidal
Copy link

@devmuaz same error with the 3.4.1

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: DYLD 1 Library missing
Library not loaded: @rpath/OneSignalExtension.framework/OneSignalExtension

image

@devmuaz
Copy link
Author

devmuaz commented Nov 22, 2022

@chrisvidal I believe that the version is still the same in the pubspec.lock file, you need to delete it and run:

flutter pub get

If still not working, clear the pub cache by running:

flutter pub cache clean && flutter pub get

@chrisvidal
Copy link

starting a blank project with 3.4.1 and see...

@emawby
Copy link
Contributor

emawby commented Dec 2, 2022

Make sure you are using Cocoapods 1.11.3 with ruby 2.7.5 and try the below code. We have seen this issue when using versions lower than 1.11.3 and Ruby 2.6.0, but it gets resolved after upgrading

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

@glin94
Copy link

glin94 commented Dec 20, 2022

this work for me
Go to Project --> Targets --> [Application Name] --> Frameworks, Libraries, and Embedded Content section.
Click + icon --> Type OneSignal in the search box --> Select OneSignalCore.xcframework and click Add button.
Do the same for OneSignalOutcomes.xcframework.
Check Embed and Sign on both.

Clean build folder and build.

Снимок экрана 2022-12-21 в 00 30 33

@jodymac
Copy link

jodymac commented Jan 25, 2023

I couldn't get anything to work, downgrading, upgrading until I added the groups to info plist(runner and service extension) following the directions of the latest guide. I didn't have that setup.

I added those and I was able to build. Granted I did a ton of pod updates and installs, but it's working now. I also followed the steps before to update ruby and cocoapods.

@GusRodrigues86
Copy link

this work for me Go to Project --> Targets --> [Application Name] --> Frameworks, Libraries, and Embedded Content section. Click + icon --> Type OneSignal in the search box --> Select OneSignalCore.xcframework and click Add button. Do the same for OneSignalOutcomes.xcframework. Check Embed and Sign on both.

Clean build folder and build.

Снимок экрана 2022-12-21 в 00 30 33

That's what worked.

@AndreiMisiukevich
Copy link

I am still using onesignal_flutter: 3.4.1
are there any updates on this issue? Thanks!

@shkvoretz
Copy link

having this issue on my Intel Mac, but on on M1 chip.

@shkvoretz
Copy link

upgrading ruby and cocoapods as well as using onesignal_flutter: 3.4.1 fixed the issue for my Intel Mac

@AlexSmirnov9107
Copy link

upgrading ruby and cocoapods as well as using onesignal_flutter: 3.4.1 fixed the issue for my Intel Mac

what versions of ruby and cocoapods have you upgraded?

@shkvoretz
Copy link

upgrading ruby and cocoapods as well as using onesignal_flutter: 3.4.1 fixed the issue for my Intel Mac

what versions of ruby and cocoapods have you upgraded?

The latest - Cocoapods 1.11.3 Ruby 3.2.1

@AndreiMisiukevich
Copy link

This is a critical issue blocking library upgrades. Is it possible to prioritize it?

@nan-li
Copy link
Contributor

nan-li commented Apr 17, 2023

Hi @AndreiMisiukevich,

Did you try the steps mentioned to resolve?

We were able to reproduce the issue when we used a lower ruby version, and the error resolved after we updated.

Make sure you are using Cocoapods 1.11.3 with ruby 2.7.5 and try the below code. We have seen this issue when using versions lower than 1.11.3 and Ruby 2.6.0, but it gets resolved after upgrading

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

@AndreiMisiukevich
Copy link

Hi @nan-li, thanks for the response!
I haven't tried it yet.

Do you think the steps you shared help with the latest version of OneSignal SDK?
I saw this comment #613 (comment) and thought it would help only for version 3.4.1, which works like a charm for me even without any addition steps.

@nan-li
Copy link
Contributor

nan-li commented Apr 17, 2023

Hi @AndreiMisiukevich,

I think these steps are good for 3.4.2+.
I was able to personally reproduce this issue after I updated my Xcode from 14 to 14.1 and using OneSignal Flutter SDK 3.4.2.
My ruby version was also 2.6.8.

Then the problem went away after I update my ruby version to 2.7.5+ and cocoapods to 1.11.3.

@AndreiMisiukevich
Copy link

@nan-li thanks for the explanation. Unfortunately, I can't control the ruby version since I am building my application with Codemagic which doesn't provide a way to manage the ruby version (only Pod).

@emawby
Copy link
Contributor

emawby commented Apr 21, 2023

@AndreiMisiukevich Cocoapods released 1.12.1 maybe that updated version will resolve the issue since it has an explicit ruby version requirement >2.7.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests