Pushwoosh / pushwoosh-appcelerator-titanium

Other
33 stars 16 forks source link

Android 12 crash (SDK Target 31) #87

Closed macasfaj closed 1 year ago

macasfaj commented 1 year ago

Hi!

We have a serious problem that prevents us from releasing new versions to the store. When starting the App after this log its execution dies:

[DEBUG] Pushwoosh: sendAppOpenEndTagMigrate [DEBUG] Pushwoosh: [[BusinessCase]] trigger welcome-inapp [DEBUG] Pushwoosh: [BusinessCase] welcome-inapp condition not satisfied [DEBUG] Pushwoosh: [[BusinessCase]] trigger app-update-message [DEBUG] Pushwoosh: [BusinessCase] app-update-message condition not satisfied [ERROR] V8Exception: Exception occurred at /app.js:31: Uncaught TypeError: Cannot read property 'intent' of null

We only did this update in tiApp.xml:

That is mandatory currently, Google new rules.

If we set , all works in device & simulator.

Please, we need urgent help. Any idea? Thank you!

wfhm commented 1 year ago

@macasfaj it looks like the tiApp.xml changes were not added correctly, so could you please re-add it?

macasfaj commented 1 year ago

Sure. I've checked TiApp and looks ok.

Scenario 1:

<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30"/> ALL GOOD :)

<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31"/>

Fails! :(

[INFO] TiApplication: (main) [0,0] checkpoint, app created. [INFO] FirebaseApp: Device unlocked: initializing all Firebase APIs for app [DEFAULT] [INFO] FirebaseInitProvider: FirebaseApp initialization successful [ERROR] Pushwoosh: This is not an Amazon device. The service is not available. [DEBUG] Pushwoosh: Initializing InternalCrashAnalyticsModule [DEBUG] Pushwoosh: Current handler class = com.android.internal.os.RuntimeInit$KillApplicationHandler [DEBUG] Pushwoosh: Executing CrashManager [DEBUG] Pushwoosh: Looking for stacktraces to send. [DEBUG] Pushwoosh: Looking for exceptions in: /data/user/0/city.mapyour/files [DEBUG] Pushwoosh: No stacktraces were found. [WARN] ziparchive: Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/0000017a/DynamiteLoader.dm': No such file or directory [WARN] ziparchive: Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/0000017a/DynamiteLoader.dm': No such file or directory [INFO] DynamiteModule: Considering local module com.google.android.gms.measurement.dynamite:73 and remote module com.google.android.gms.measurement.dynamite:87 [INFO] DynamiteModule: Selected remote version of com.google.android.gms.measurement.dynamite, version >= 87 [INFO] Pushwoosh: Log level: DEBUG [DEBUG] Pushwoosh: [PushRegistrarHelper] Initializing default PushRegistrar in a plugin [ERROR] Pushwoosh: This is not an Amazon device. The service is not available. [WARN] System: ClassLoader referenced unknown path: [DEBUG] nativeloader: Configuring classloader-namespace for other apk . target_sdk_version=33, uses_libraries=, library_path=/data/app/~~4vT6ocMfjAgNNk8mdQ8csQ==/com.google.android.gms-k1XwEgLYs2c33htYORENZQ==/lib/arm64:/data/app/~~4vT6ocMfjAgNNk8mdQ8csQ==/com.google.android.gms-k1XwEgLYs2c33htYORENZQ==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.google.android.gms [DEBUG] Pushwoosh: initHwid [INFO] Pushwoosh: [NotificationManager] Sender ID: 1064573959894 [INFO] Pushwoosh: [NotificationManager] App ID: CDCFE-20872 [DEBUG] Pushwoosh: appOpen:false onAppReady:false [INFO] Pushwoosh: HWID: 05494ff6-7228-4685-a9c8-ca6c53380245 [DEBUG] Pushwoosh: [PushwooshModule] onApplicationCreated [INFO] Pushwoosh: [d] This is Android FCM device [WARN] ziparchive: Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/0000017f/MeasurementDynamite.dm': No such file or directory [WARN] ziparchive: Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/0000017f/MeasurementDynamite.dm': No such file or directory [DEBUG] CompatibilityChangeReporter: Compat change id reported: 160794467; UID 10010; state: ENABLED [INFO] Process: Sending signal. PID: 14599 SIG: 9

macasfaj commented 1 year ago

One last note, if I remove pushwoosh from TiApp... the app works! Without pushes but it runs. Any idea please?

macasfaj commented 1 year ago

I got the crash:

02-16 19:09:41.392 19141 19141 I Pushwoosh: [d] This is Android FCM device 02-16 19:09:41.473 19141 19183 D CompatibilityChangeReporter: Compat change id reported: 160794467; UID 10010; state: ENABLED 02-16 19:09:41.475 19141 19183 E AndroidRuntime: FATAL EXCEPTION: pool-11-thread-1 02-16 19:09:41.475 19141 19183 E AndroidRuntime: Process: city.mapyour, PID: 19141 02-16 19:09:41.475 19141 19183 E AndroidRuntime: java.lang.IllegalArgumentException: city.mapyour: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. 02-16 19:09:41.475 19141 19183 E AndroidRuntime: Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles. 02-16 19:09:41.475 19141 19183 E AndroidRuntime: at android.app.PendingIntent.checkFlags(PendingIntent.java:377) 02-16 19:09:41.475 19141 19183 E AndroidRuntime: at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:647) 02-16 19:09:41.475 19141 19183 E AndroidRuntime: at android.app.PendingIntent.getBroadcast(PendingIntent.java:634) 02-16 19:09:41.475 19141 19183 E AndroidRuntime: at androidx.work.impl.utils.ForceStopRunnable.getPendingIntent(ForceStopRunnable.java:273) 02-16 19:09:41.475 19141 19183 E AndroidRuntime: at androidx.work.impl.utils.ForceStopRunnable.isForceStopped(ForceStopRunnable.java:151) 02-16 19:09:41.475 19141 19183 E AndroidRuntime: at androidx.work.impl.utils.ForceStopRunnable.forceStopRunnable(ForceStopRunnable.java:171) 02-16 19:09:41.475 19141 19183 E AndroidRuntime: at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:102) 02-16 19:09:41.475 19141 19183 E AndroidRuntime: at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91) 02-16 19:09:41.475 19141 19183 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) 02-16 19:09:41.475 19141 19183 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) 02-16 19:09:41.475 19141 19183 E AndroidRuntime: at java.lang.Thread.run(Thread.java:1012) 02-16 19:09:41.478 2192 3126 W ActivityTaskManager: Force finishing activity city.mapyour/.MapYourCityActivity

wfhm commented 1 year ago

@macasfaj the plugin needs to be updated with the latest Pushwoosh Android SDK version. Will be done early next week.

macasfaj commented 1 year ago

@wfhm any update? We need to release a version ASAP. Thank you!

m1ga commented 1 year ago

@macasfaj please try the update version in https://github.com/Pushwoosh/pushwoosh-appcelerator-titanium/pull/88 I'm using 6.6.9 now

macasfaj commented 1 year ago

@m1ga It's not working :( Same issue. "Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE, etc..."

m1ga commented 1 year ago

ok, hopefully they'll update the flags!

macasfaj commented 1 year ago

@wfhm Please, any update???

wfhm commented 1 year ago

@macasfaj we are updating all our plugins this week, so you can expect the new version later today or tomorrow.

macasfaj commented 1 year ago

Great!! Thanks!!!

wfhm commented 1 year ago

@macasfaj Fixed with the latest release.