OneSignal / OneSignal-Flutter-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your flutter app with OneSignal
https://www.onesignal.com
Other
623 stars 213 forks source link

[Bug]: OneSignalNotificationServiceExtension.appex is missing its bundle executable #963

Closed ivarli closed 1 month ago

ivarli commented 1 month ago

What happened?

I followed every step from Onesignal Flutter Tutorial, i am debugging since 3 days, but it still won't work. I tried out OneSignal on 16.09.2024 and it worked fine, but now after one Month nothing works. I can't start the app, because XCode is giving me the erorr that "Project X can't be installed". I reproduced every step so many times, and got through all of stackoverflow and github issues about this error, but still can't find any solution. I tried almost every suggested ones... I also asked ChatGPT-o1, followed 15 Steps step by step and have no solution yet...

Steps to reproduce?

1. Create a new Flutter Project
2. Pub add latest Onesignal flutter package.
3. Follow all the instructions exactly one to one in the Tutorial of Onesignal for Flutter.
4. Get Errors, and fix them with the known "PBXGroup" and "objectVersion = 56" replacement.
5. Refactor Build Phases for the next error: so that "Embed Foundation Extensions" get exactly under Copy Bundle Resources.
6. Run the App. 
7. Get XCode Error, even if flutter does not throw an error.

What did you expect to happen?

I expected the app to build and run with the onesignal flutter package installed.

Here the final error screenshot: Bildschirmfoto 2024-10-17 um 16 20 02

OneSignal Flutter SDK version

5.2.6

Which platform(s) are affected?

Relevant log output

„Bicay“ kann nicht installiert werden
Domain: IXUserPresentableErrorDomain
Code: 1
Recovery Suggestion: Runner.app/PlugIns/OneSignalNotificationServiceExtension.appex is missing its bundle executable. Please check your build settings to make sure that a bundle executable is produced at the path "Runner.app/PlugIns/OneSignalNotificationServiceExtension.appex/OneSignalNotificationServiceExtension".
User Info: {
    DVTErrorCreationDateKey = "2024-10-17 14:10:01 +0000";
    IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker;
}
--
Failed to install the app on the device.
Domain: com.apple.dt.CoreDeviceError
Code: 3002
User Info: {
    NSURL = "file:///Users/ivarli/Desktop/bicay/build/ios/iphoneos/Runner.app";
}
--
„Bicay“ kann nicht installiert werden
Domain: IXUserPresentableErrorDomain
Code: 1
Failure Reason: Versuche es später noch einmal.
Recovery Suggestion: Runner.app/PlugIns/OneSignalNotificationServiceExtension.appex is missing its bundle executable. Please check your build settings to make sure that a bundle executable is produced at the path "Runner.app/PlugIns/OneSignalNotificationServiceExtension.appex/OneSignalNotificationServiceExtension".
--
Runner.app/PlugIns/OneSignalNotificationServiceExtension.appex is missing its bundle executable. Please check your build settings to make sure that a bundle executable is produced at the path "Runner.app/PlugIns/OneSignalNotificationServiceExtension.appex/OneSignalNotificationServiceExtension".
Domain: MIInstallerErrorDomain
Code: 71
User Info: {
    FunctionName = "-[MIExecutableBundle executableExistsWithError:]";
    SourceFileLine = 1580;
}
--
lstat of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.tCmGDJ/extracted/Runner.app/PlugIns/OneSignalNotificationServiceExtension.appex/OneSignalNotificationServiceExtension failed: No such file or directory
Domain: NSPOSIXErrorDomain
Code: 2
Failure Reason: No such file or directory
User Info: {
    FunctionName = "-[MIFileManager itemExistsAtURL:error:]";
    SourceFileLine = 1345;
}
--

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_identifier" = "00008110-001205D221A2801E";
    "device_isCoreDevice" = 1;
    "device_model" = "iPhone14,2";
    "device_osBuild" = "18.0.1 (22A3370)";
    "device_platform" = "com.apple.platform.iphoneos";
    "device_thinningType" = "iPhone14,2";
    "dvt_coredevice_version" = "397.21";
    "dvt_coresimulator_version" = 987;
    "dvt_mobiledevice_version" = "1759.2.1";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 2220;
    "operation_errorCode" = 1;
    "operation_errorDomain" = IXUserPresentableErrorDomain;
    "operation_errorWorker" = IDEInstallCoreDeviceWorker;
    "operation_name" = IDERunOperationWorkerGroup;
    "param_debugger_attachToExtensions" = 0;
    "param_debugger_attachToXPC" = 1;
    "param_debugger_type" = 3;
    "param_destination_isProxy" = 0;
    "param_destination_platform" = "com.apple.platform.iphoneos";
    "param_diag_113575882_enable" = 0;
    "param_diag_MainThreadChecker_stopOnIssue" = 0;
    "param_diag_MallocStackLogging_enableDuringAttach" = 0;
    "param_diag_MallocStackLogging_enableForXPC" = 1;
    "param_diag_allowLocationSimulation" = 1;
    "param_diag_checker_tpc_enable" = 1;
    "param_diag_gpu_frameCapture_enable" = 0;
    "param_diag_gpu_shaderValidation_enable" = 0;
    "param_diag_gpu_validation_enable" = 0;
    "param_diag_guardMalloc_enable" = 0;
    "param_diag_memoryGraphOnResourceException" = 0;
    "param_diag_mtc_enable" = 1;
    "param_diag_queueDebugging_enable" = 1;
    "param_diag_runtimeProfile_generate" = 0;
    "param_diag_sanitizer_asan_enable" = 0;
    "param_diag_sanitizer_tsan_enable" = 0;
    "param_diag_sanitizer_tsan_stopOnIssue" = 0;
    "param_diag_sanitizer_ubsan_enable" = 0;
    "param_diag_sanitizer_ubsan_stopOnIssue" = 0;
    "param_diag_showNonLocalizedStrings" = 0;
    "param_diag_viewDebugging_enabled" = 1;
    "param_diag_viewDebugging_insertDylibOnLaunch" = 1;
    "param_install_style" = 2;
    "param_launcher_UID" = 2;
    "param_launcher_allowDeviceSensorReplayData" = 0;
    "param_launcher_kind" = 0;
    "param_launcher_style" = 99;
    "param_launcher_substyle" = 0;
    "param_runnable_appExtensionHostRunMode" = 0;
    "param_runnable_productType" = "com.apple.product-type.application";
    "param_structuredConsoleMode" = 1;
    "param_testing_launchedForTesting" = 0;
    "param_testing_suppressSimulatorApp" = 0;
    "param_testing_usingCLI" = 0;
    "sdk_canonicalName" = "iphoneos18.0";
    "sdk_osVersion" = "18.0";
    "sdk_variant" = iphoneos;
}
--

System Information

macOS Version 15.0.1 (Build 24A348)
Xcode 16.0 (23051) (Build 16A242d)
Timestamp: 2024-10-17T16:10:01+02:00

Code of Conduct

AxitGondaliya commented 1 month ago

Hi @ivarli

The issue is resolved by simply removing OneSignalNotificationServiceExtension.appex from Framework, Libraries and Embedded content section

Before

image

After

image
ivarli commented 1 month ago

Thanks a lot, I had to flutter clean once more, after your solution and it worked. You saved me days of headaches.

harrynguyenangle commented 1 month ago

no, this will lead to another issue

[!] Unable to find host target(s) for OneSignalNotificationServiceExtension. Please add the host targets for the embedded targets to the Podfile.

remmesesthegreat commented 1 month ago

no, this will lead to another issue

[!] Unable to find host target(s) for OneSignalNotificationServiceExtension. Please add the host targets for the embedded targets to the Podfile.

How do i add host target. I followed the one of removing the file and as you say it then gives this error on podfiles. Thanks

remmesesthegreat commented 1 month ago

Hi @ivarli

The issue is resolved by simply removing OneSignalNotificationServiceExtension.appex from Framework, Libraries and Embedded content section

Before image

After image

Solution work but when i tried to build the project again i get : [!] Unable to find host target(s) for OneSignalNotificationServiceExtension. Please add the host targets for the embedded targets to the Podfile.

Using ionic capacitor.

remmesesthegreat commented 1 month ago

Hi this solution worked better for me https://github.com/OneSignal/OneSignal-iOS-SDK/issues/1274#issuecomment-1710441280 Havent tested on real device but now i dont have any arrors when building or archiving