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

The application does not open via push from the background #4385

Open
1 of 2 tasks
tupikvtypike opened this issue Feb 28, 2024 · 0 comments
Open
1 of 2 tasks

The application does not open via push from the background #4385

tupikvtypike opened this issue Feb 28, 2024 · 0 comments

Comments

@tupikvtypike
Copy link

What happened?

The command does not execute when the application is in the background

await device.launchApp({
    delete: false,
    newInstance: false,
    userNotification: notification,
  });

notification = {
      trigger: {
        type: DetoxConstants.userNotificationTriggers.push,
      },
      badge: 1,
      body: message,
      payload: {
        ack_id: 'ack-e2e-test-id',
        type: 'message',
        version: '2',
        channel_id: channel.id,
        channel_name: channel.name,
        team_id: team.id,
        sender_id: user.id,
        sender_name: 'This is an e2e test title',
        post_id: 'post-e2e-test-id',
        root_id: (rootPost === '') ? '' : rootPost.id,
      },
    }

Error:

Detox can't seem to connect to the test app(s)!

    HINT: 

    Have you forgotten to call 'device.launchApp()' in the beginning of your test?
    Refer to our troubleshooting guide, for full details: https://wix.github.io/Detox/docs/troubleshooting/running-tests#tests-execution-hangs

    ---
    The following package could not be delivered:

    {
      type: 'deliverPayload',
      params: [Object],
      messageId: 17
    }

Everything worked on version 20.15.0
On version 20.16.0 I caught an error

What was the expected behaviour?

The application will open and the push will take place

Was it tested on latest Detox?

  • I have tested this issue on the latest Detox release and it still reproduces.

Did your test throw out a timeout?

Help us reproduce this issue!

No response

In what environment did this happen?

Detox version: 20.17.0
React Native version: 0.72
Has Fabric (React Native's new rendering system) enabled: (yes/no)
Node version: v16.15.1
Device model: iPhone 13
iOS version: 17.0
macOS version: Ventura 13.5.1
Xcode version: 15.2
Test-runner (select one): jest

Detox logs

Detox logs
paste logs here!

Device logs

Device logs
paste your device.log here!

More data, please!

No response

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

No branches or pull requests

1 participant