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]: NotificationOpened is not invoked on Huawei #541

Open
1 task done
gadzilka opened this issue Oct 10, 2022 · 0 comments
Open
1 task done

[Bug]: NotificationOpened is not invoked on Huawei #541

gadzilka opened this issue Oct 10, 2022 · 0 comments

Comments

@gadzilka
Copy link

What happened?

The 'NotificationOpened' event is not invoked when a remote push notification is opened on Huawei devices. Thus, neither additional data nor launch URL can be received.

In console:

Exception: No such proxy method: OneSignalSDK.OneSignalAndroid+OSNotificationOpenedHandler.notificationOpened(UnityEngine.AndroidJavaObject)

Steps to reproduce?

1. Run app
2. Send push notification to Huawei device
3. Open push notification on device

What did you expect to happen?

The NotificationOpened event must be invoked when the notification is opened.

Unity version

2020.3.40f1

OneSignal Unity SDK version

3.0.4

Platform

Android

Relevant log output

I/Unity: [OneSignal] OneSignal.Default set to platform SDK OneSignalSDK.OneSignalAndroid. Current version is 3.0.0 OneSignalSDK.OneSignal:set_Default(OneSignal)
E/OneSignal: Waiting for remote params. Moving setLocationShared() operation to a pending task queue.
D/OneSignal: Adding a task to the pending queue with ID: 1
D/OneSignal: startPendingTasks with task queue quantity: 1
D/OneSignal: Attempted to clean 6 month old IAM data, but none exists!
D/OneSignal: Retrieved IAMs from DB redisplayedInAppMessages: []
I/OneSignal: Last Pending Task has ran, shutting down
D/OneSignal: OneSignal InAppMessageTracker initInfluencedTypeFromCache: OSChannelTracker{tag=iam_id, influenceType=UNATTRIBUTED, indirectIds=null, directId=null}
D/OneSignal: OneSignal NotificationTracker initInfluencedTypeFromCache: OSChannelTracker{tag=notification_id, influenceType=UNATTRIBUTED, indirectIds=null, directId=null}
D/OneSignal: OneSignal getUnattributedUniqueOutcomeEventsSentByChannel: []
V/OneSignal: appContext set and cached app id found, calling setAppId with: <app-id-replaced>
V/OneSignal: setAppId called with id: <app-id-replaced> changing id from: null
V/OneSignal: Starting OneSignal initialization!
V/OneSignal: No class found, not setting up OSRemoteNotificationReceivedHandler
V/OneSignal: OneSignal SDK initialization delayed, waiting for remote params.
D/OneSignal: Starting request to get Android parameters.
D/OneSignal: OneSignalRestClient: Making request to: https://api.onesignal.com/apps/<app-id-replaced>/android_params.js?player_id=dc328e83-eabc-407a-abdf-711e455a16ee
D/OneSignal: OneSignalRestClient: Adding header if-none-match: W/"4a9befd8ef3c39769af8d5b18db1da44"
V/OneSignal: setAppId called with id: <app-id-replaced> changing id from: null
V/OneSignal: Starting OneSignal initialization!
V/OneSignal: No class found, not setting up OSRemoteNotificationReceivedHandler
V/OneSignal: OneSignal SDK initialization delayed, waiting for remote params.
V/OneSignal: OneSignalRestClient: After con.getResponseCode to: https://api.onesignal.com/apps/<app-id-replaced>/android_params.js?player_id=dc328e83-eabc-407a-abdf-711e455a16ee
D/OneSignal: OneSignalRestClient: GET - Using Cached response due to 304: {"awl_list":{},"android_sender_id":"771335629165","chnl_lst":[],"outcomes":{"direct":{"enabled":false},"indirect":{"notification_attribution":{"minutes_since_displayed":60,"limit":10},"enabled":false},"unattributed":{"enabled":false}},"receive_receipts_enable":false}
D/OneSignal: OneSignal saveInfluenceParams: InfluenceParams{indirectNotificationAttributionWindow=60, notificationLimit=10, indirectIAMAttributionWindow=1440, iamLimit=10, directEnabled=false, indirectEnabled=false, unattributedEnabled=false}
D/OneSignal: reassignDelayedInitParams with appContext: android.app.Application@3afa5bd
V/OneSignal: setAppId called with id: <app-id-replaced> changing id from: null
V/OneSignal: Starting OneSignal initialization!
V/OneSignal: No class found, not setting up OSRemoteNotificationReceivedHandler
D/OneSignal: OneSignal handleActivityLifecycleHandler inForeground: true
D/OneSignal: Application foregrounded focus time: 224829764
D/OneSignal: isPastOnSessionTime currentTimeMillis: 1665398440928 lastSessionTime: 1665398428221 difference: 12707
D/OneSignal: Continue on same session with appEntryState: APP_CLOSE
D/OneSignal: OneSignal SessionManager attemptSessionUpgrade with entryAction: APP_CLOSE
D/OneSignal: OneSignal SessionManager attemptSessionUpgrade try UNATTRIBUTED to INDIRECT upgrade
D/OneSignal: Trackers after update attempt: [OSChannelTracker{tag=notification_id, influenceType=UNATTRIBUTED, indirectIds=null, directId=null}, OSChannelTracker{tag=iam_id, influenceType=UNATTRIBUTED, indirectIds=null, directId=null}]
D/OneSignal: OneSignal SessionManager sendSessionEndingWithInfluences with influences: []
D/OneSignal: initWithCachedInAppMessages: null
D/OneSignal: LocationController sendAndClearPromptHandlers from non prompt flow
I/OneSignal: Restoring notifications
I/OneSignal: Querying DB for notifications to restore: created_time > 1664793640 AND dismissed = 0 AND opened = 0 AND is_summary = 0 AND expire_time > 1665398440
D/OneSignal: registerUser:registerForPushFired:false, locationFired: true, remoteParams: com.onesignal.OneSignalRemoteParams$2@f027f07, appId: <app-id-replaced>
D/OneSignal: registerUser not possible
I/WM-WorkerWrapper: Worker result SUCCESS for Work [ id=8c1ef59e-e76a-4f9f-8c5d-711ed7806ee9, tags={ com.onesignal.OSNotificationRestoreWorkManager$NotificationRestoreWorker } ]
V/OneSignal: OneSignal SDK initialization done.
D/OneSignal: startPendingTasks with task queue quantity: 1
D/OneSignal: Running setLocationShared() operation from pending task queue.
D/OneSignal: OneSignal startLocationShared: false
D/OneSignal: OneSignal is shareLocation set false, clearing last location!
I/OneSignal: Last Pending Task has ran, shutting down
I/OneSignal: Device registered for HMS, push token = IQAAAACy0jeXAABj6hPZf2w0Qlxep-nETFLz5DkxDP0HrH94yBPYHKfB-y99fCZIEx0p5Ak6XFH4FzUnmDJdRqvpTEqYAlkQfwUS7C5Xev4_-7lQBg
D/OneSignal: registerForPushToken completed with id: IQAAAACy0jeXAABj6hPZf2w0Qlxep-nETFLz5DkxDP0HrH94yBPYHKfB-y99fCZIEx0p5Ak6XFH4FzUnmDJdRqvpTEqYAlkQfwUS7C5Xev4_-7lQBg status: 1
D/OneSignal: registerUser:registerForPushFired:true, locationFired: true, remoteParams: com.onesignal.OneSignalRemoteParams$2@f027f07, appId: <app-id-replaced>
D/OneSignal: registerUserTask calling readyToUpdate
D/OneSignal: UserStateSynchronizer internalSyncUserState from session call: false jsonBody: null
D/OneSignal: onActivityPaused: com.unity3d.player.UnityPlayerActivity@d224328
D/OneSignal: ActivityLifecycleHandler Handling lost focus
D/OneSignal: curActivity is NOW: null
V/OneSignal: initWithContext called with: android.app.Application@3afa5bd
V/OneSignal: Starting OneSignal initialization!
V/OneSignal: No class found, not setting up OSRemoteNotificationReceivedHandler
D/OneSignal: OneSignal SDK initialization already completed.
D/OneSignal: OneSignalRestClient: Making request to: https://api.onesignal.com/notifications/95117cc7-515e-42b3-8af8-df00ad813872
D/OneSignal: OneSignalRestClient: PUT SEND JSON: {"app_id":"<app-id-replaced>","player_id":"dc328e83-eabc-407a-abdf-711e455a16ee","opened":true,"device_type":13}
D/OneSignal: Running destroyTimeout with runnable: com.onesignal.OSNotificationOpenedResult$1@1e1fdfc
D/OneSignal: Running startTimeout with timeout: 5000 and runnable: com.onesignal.OSNotificationOpenedResult$1@1e1fdfc
E/Unity: Exception: No such proxy method: OneSignalSDK.OneSignalAndroid+OSNotificationOpenedHandler.notificationOpened(UnityEngine.AndroidJavaObject)
D/ActivityThread: add activity client record, r= ActivityRecord{ccfcaa6 token=android.os.BinderProxy@8895c93 {<bundle-id-replaced>/com.onesignal.NotificationOpenedActivityHMS}} token= android.os.BinderProxy@8895c93
D/OneSignal: onActivityDestroyed: com.onesignal.NotificationOpenedActivityHMS@69c0ce7
D/OneSignal: curActivity is NOW: null
D/ActivityThread: Remove activity client record, r= ActivityRecord{ccfcaa6 token=android.os.BinderProxy@8895c93 {<bundle-id-replaced>/com.onesignal.NotificationOpenedActivityHMS}} token= android.os.BinderProxy@8895c93
D/OneSignal: onActivityResumed: com.unity3d.player.UnityPlayerActivity@d224328
D/OneSignal: curActivity is NOW: com.unity3d.player.UnityPlayerActivity:com.unity3d.player.UnityPlayerActivity@d224328
D/OneSignal: ActivityLifecycleHandler handleFocus, nextResumeIsFirstActivity: true
D/OneSignal: ActivityLifecycleHandler reset background state, call app focus
D/OneSignal: OSFocusHandler running onAppFocus
D/OneSignal: Application on focus
D/OneSignal: OSNotificationOpenedResult onEntryStateChange called with appEntryState: APP_CLOSE
D/OneSignal: OSNotificationOpenedResult complete called with opened: true
D/OneSignal: Running destroyTimeout with runnable: com.onesignal.OSNotificationOpenedResult$1@1e1fdfc
D/OneSignal: OneSignal SessionManager onDirectInfluenceFromNotificationOpen notificationId: 95117cc7-515e-42b3-8af8-df00ad813872
D/OneSignal: OneSignal SessionManager attemptSessionUpgrade with entryAction: NOTIFICATION_CLICK
D/OneSignal: OSChannelTracker changed: notification_id from: influenceType: UNATTRIBUTED, directNotificationId: null, indirectNotificationIds: null to: influenceType: DIRECT, directNotificationId: 95117cc7-515e-42b3-8af8-df00ad813872, indirectNotificationIds: null
D/OneSignal: Trackers changed to: [OSChannelTracker{tag=notification_id, influenceType=DIRECT, indirectIds=null, directId=95117cc7-515e-42b3-8af8-df00ad813872}, OSChannelTracker{tag=iam_id, influenceType=UNATTRIBUTED, indirectIds=null, directId=null}]
D/OneSignal: OneSignal SessionManager attemptSessionUpgrade channel updated, search for ending direct influences on channels: [OSChannelTracker{tag=iam_id, influenceType=UNATTRIBUTED, indirectIds=null, directId=null}]
D/OneSignal: OneSignal SessionManager attemptSessionUpgrade try UNATTRIBUTED to INDIRECT upgrade
D/OneSignal: OneSignal ChannelTracker getLastReceivedIds lastChannelObjectReceived: []
D/OneSignal: Trackers after update attempt: [OSChannelTracker{tag=notification_id, influenceType=DIRECT, indirectIds=null, directId=95117cc7-515e-42b3-8af8-df00ad813872}, OSChannelTracker{tag=iam_id, influenceType=UNATTRIBUTED, indirectIds=null, directId=null}]
D/OneSignal: OneSignal SessionManager sendSessionEndingWithInfluences with influences: [SessionInfluence{influenceChannel=notification, influenceType=DISABLED, ids=null}]
D/OneSignal: OneSignal cleanOutcomes for session
D/OneSignal: OneSignal save unattributedUniqueOutcomeEvents: []
D/OneSignal: FocusTimeProcessorUnattributed:saveUnsentActiveData with lastFocusTimeInfluences: [SessionInfluence{influenceChannel=notification, influenceType=DISABLED, ids=null}]
D/OneSignal: FocusTimeProcessorUnattributed:getUnsentActiveTime: 102
D/OneSignal: FocusTimeProcessorUnattributed:saveUnsentActiveTime: 169
D/OneSignal: FocusTimeProcessorUnattributed sendTime with: END_SESSION
D/OneSignal: Application foregrounded focus time: 224896314
D/OneSignal: isPastOnSessionTime currentTimeMillis: 1665398507473 lastSessionTime: 1665398428221 difference: 79252
D/OneSignal: Starting new session with appEntryState: NOTIFICATION_CLICK
D/OneSignal: OneSignal cleanOutcomes for session
D/OneSignal: OneSignal save unattributedUniqueOutcomeEvents: []
D/OneSignal: OneSignal SessionManager restartSessionIfNeeded with entryAction: NOTIFICATION_CLICK channelTrackers: [OSChannelTracker{tag=iam_id, influenceType=UNATTRIBUTED, indirectIds=null, directId=null}]
D/OneSignal: OneSignal ChannelTracker getLastReceivedIds lastChannelObjectReceived: []
D/OneSignal: OneSignal SessionManager restartSessionIfNeeded lastIds: []
D/OneSignal: OneSignal SessionManager sendSessionEndingWithInfluences with influences: []
D/OneSignal: Last session time set to: 1665398507476
D/OneSignal: initWithCachedInAppMessages: null
D/OneSignal: LocationController sendAndClearPromptHandlers from non prompt flow
D/OneSignal: registerUser:registerForPushFired:true, locationFired: true, remoteParams: com.onesignal.OneSignalRemoteParams$2@f027f07, appId: <app-id-replaced>
D/OneSignal: LocationController scheduleUpdate not possible, location shared not enabled
D/OneSignal: OSSyncService cancel background sync
V/OneSignal: OneSignalRestClient: After con.getResponseCode to: https://api.onesignal.com/notifications/95117cc7-515e-42b3-8af8-df00ad813872
D/OneSignal: OneSignalRestClient: Successfully finished request to: https://api.onesignal.com/notifications/95117cc7-515e-42b3-8af8-df00ad813872
D/OneSignal: OneSignalRestClient: PUT RECEIVED JSON: {"success":true}
D/OneSignal: registerUserTask calling readyToUpdate
I/WM-WorkerWrapper: Worker result FAILURE for Work [ id=26c9f805-f6fd-4aec-9e6a-635fc2e5859a, tags={ com.onesignal.OSNotificationRestoreWorkManager$NotificationRestoreWorker } ]
I/OneSignal: Device registered for HMS, push token = IQAAAACy0jeXAABj6hPZf2w0Qlxep-nETFLz5DkxDP0HrH94yBPYHKfB-y99fCZIEx0p5Ak6XFH4FzUnmDJdRqvpTEqYAlkQfwUS7C5Xev4_-7lQBg
D/OneSignal: registerForPushToken completed with id: IQAAAACy0jeXAABj6hPZf2w0Qlxep-nETFLz5DkxDP0HrH94yBPYHKfB-y99fCZIEx0p5Ak6XFH4FzUnmDJdRqvpTEqYAlkQfwUS7C5Xev4_-7lQBg status: 1
D/OneSignal: registerUser:registerForPushFired:true, locationFired: true, remoteParams: com.onesignal.OneSignalRemoteParams$2@f027f07, appId: <app-id-replaced>
D/OneSignal: registerUserTask calling readyToUpdate
D/OneSignal: UserStateSynchronizer internalSyncUserState from session call: true jsonBody: {"app_id":"<app-id-replaced>"}
D/OneSignal: OneSignalRestClient: Making request to: https://api.onesignal.com/players/dc328e83-eabc-407a-abdf-711e455a16ee/on_session
D/OneSignal: OneSignalRestClient: POST SEND JSON: {"app_id":"<app-id-replaced>"}
V/OneSignal: OneSignalRestClient: After con.getResponseCode to: https://api.onesignal.com/players/dc328e83-eabc-407a-abdf-711e455a16ee/on_session
D/OneSignal: OneSignalRestClient: Successfully finished request to: https://api.onesignal.com/players/dc328e83-eabc-407a-abdf-711e455a16ee/on_session
D/OneSignal: OneSignalRestClient: POST RECEIVED JSON: {"success":true,"id":"dc328e83-eabc-407a-abdf-711e455a16ee"}
D/OneSignal: doCreateOrNewSession:response: {"success":true,"id":"dc328e83-eabc-407a-abdf-711e455a16ee"}
I/OneSignal: Device registered, UserId = dc328e83-eabc-407a-abdf-711e455a16ee
D/OneSignal: UserStateSynchronizer internalSyncUserState from session call: false jsonBody: null

Code of Conduct

  • I agree to follow this project's Code of Conduct
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

1 participant