16
Views
3
Comments
[OneSignal Plugin] Invalid call of the 'OnValueCallback'
Question
onesignal-plugin
Mobile icon
Forge asset by OutSystems
Application Type
Mobile
Service Studio Version
11.55.59 (Build 64640)

I am encountering an error with OneSignal push notifications when navigating from push notification to the screen.

Invalid call of the 'OnValueCallback' client action of the 'MainFlow.Home' since the latter is not currently active. This is likely due to a platform's client action being used as an event handler or in a setTimeout function. Consider removing this call by using the 'On Destroy' event of the screen/block or moving your logic to a global client action.

2021-02-17 18-31-05
Alexandre Jacinto
Staff

Hi there,


Could you share the replication steps for this issue? Is the issue when you click on a push notification and then the app opens?

Also, does it happen in Android, iOS, or both?

Best regards,

Alexandre

UserImage.jpg
Tamilarasan Senthilkumar

When I click on the push notification, it redirects to the notification screen. At that time, this error sometimes occurs. This happens on both Android and iOS.

2026-03-20 01-28-51
Saugat Biswas

Hi @Tamilarasan Senthilkumar ,

I suspect this happens when OneSignal triggers a callback after the screen that owns that client action is no longer active. 

In your case: 

  • User taps a push notification 
  • OutSystems navigates to a screen 
  • Meanwhile, OneSignal still fires a callback (Opened / Value / Data) 
  • That callback tries to invoke MainFlow.Home.OnValueCallback But Home is not active anymore 

From OutSystems documentation and forum threads: 

  • OneSignal callbacks are asynchronous 
  • They may fire: 
    • Before navigation finishes 
    • After navigation destroys the previous screen 
  • If the callback is wired to: 
    • A Screen Client Action 
    • A Block Client Action 

And that screen/block is destroyed, this results in invalid call. This is not OneSignal‑specific, but OneSignal makes it easy to hit because of delayed events.

Solution:

Move notification handling to a Global Client Action. OneSignal callbacks must not call Screen client actions directly.

  • Create a Global Client Action, for example: HandlePushNotification 
  • Bind OneSignal events to this global action: 
    • OnNotificationOpened 
    • OnNotificationReceived 
  • Inside the global action: 
    • Parse notification payload 
    • Store navigation intent in a Global Variable 
    • Trigger navigation safely 

This aligns with the OutSystems platform guidance.

Hope this helps.

Cheers,

Saugat

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.