4

I am debugging why I am seeing a "(canceled)" status in chrome custom tabs when redirect to deep link is sent using a custom scheme. ie myapp://app/path?foo=bar

The activity in my manifest is as follows:

The reason I started to debug is that I have found one case in which the redirect to the deep link is sent and the Android app/activity is not opened. When debugging I noticed that the redirect from my server shows a canceled status.

enter image description here

The redirect is coming from a nodejs server using express. I have tried sending the redirect in a couple of different ways, with the same result.

res.redirect(302, 'myapp://app/path?foo=bar');

and

res.status(302);
res.header('Location', 'myapp://app/path?foo=bar');
res.end();

In most cases the redirect, even though chrome custom tabs says its canceled still deep links to the Android application and opens the correct activity.

Should I be concerned about seeing a canceled status, even for the working cases?

If the canceled status is not of concern, any ideas on why in some cases the application/activity would not be opened when the deep link is sent? I have dug around for some time and have seen a number of issues with navigation being blocked by chrome and chrome custom tabs. Like this:

"Navigation is blocked" when redirecting from Chrome Custom Tab to Android app

However this usually points to an older version of chrome and chrome custom tabs. Any help or ideas into how I can debug why the deep link would not open the application.

lostintranslation
  • 23,756
  • 50
  • 159
  • 262

0 Answers0