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

audio_service breaks some app links when used with the app_links package [android] #1108

Open
Aulig opened this issue Feb 14, 2025 · 8 comments

Comments

@Aulig
Copy link

Aulig commented Feb 14, 2025

Documented behaviour

Not documented.

Actual behaviour

I use the app_links package to make it so links to my website (regular https links, not deep links with a custom scheme) get opened inside the webview of the app.

Most of the time the app links work completely fine, but we noticed that when a user is at checkout and tries to log in with a magic link (login link sent via e-mail), the webview breaks (becomes either unresponsive or blank).

This is related to audio_service because the issue no longer appears when I don't inherit from AudioServiceFragmentActivity. Normally I have

class MainActivity : AudioServiceFragmentActivity() {

// with my own custom onCreate function
}

but when I use

class MainActivity: FlutterFragmentActivity()

the bug no longer occurs.

Runtime error

No error logged.

Minimal reproduction project

https://github.com/Aulig/audio_service_wv_bug

Reproduction steps

These are modified (from a regular use case) instructions so you don't have to register for an account, so they might seem a bit weird.

Do once:

  1. Send yourself an e-mail to a Gmail account that you can access on your test device. The email should include the link to the website we're showing in the WebView. You can use the link https://patriciaelias.com.br/loja/
  2. Install the app
  3. Open the app info screen (where you can uninstall the app). Scroll down to "open by default" click "Add link" and select the patriciaelias link.

Do every time you want to reproduce the error:

  1. Open the app
  2. Click "Adicionar ao carrinho" on the first product on the home page
  3. Click the green "Finalizar Pedido" button
  4. Enter "[email protected]" in the e-mail address field and click Avancar
  5. Close the app (keep it open in the background/multitasking)
  6. Go into gmail and click on the link in the e-mail you sent yourself
  7. The webview will now be frozen (doesn't react to gestures) or completely blank.
  8. To reset/fix the app afterwards, uninstall it or clear its data.

Here's a video: https://e.pcloud.link/publink/show?code=XZbyylZqnAsfBy84BL31XKAdgzQm8QxnPxV

Sorry that the steps to reproduce are so complicated, I wasn't able to simplify them further yet because I don't understand how audio_service interacts with deep linking.

Output of flutter doctor

[✓] Flutter (Channel stable, 3.27.2, on Linux Mint 22.1 6.8.0-53-generic, locale
    en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.1)
[✗] Chrome - develop for the web (Cannot find Chrome executable at
    google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✗] Linux toolchain - develop for Linux desktop
    ✗ clang++ is required for Linux development.
      It is likely available from your distribution (e.g.: apt install clang),
      or can be downloaded from https://releases.llvm.org/
    ✗ CMake is required for Linux development.
      It is likely available from your distribution (e.g.: apt install cmake),
      or can be downloaded from https://cmake.org/download/
    ✗ ninja is required for Linux development.
      It is likely available from your distribution (e.g.: apt install
      ninja-build), or can be downloaded from
      https://github.com/ninja-build/ninja/releases
    ✗ GTK 3.0 development libraries are required for Linux development.
      They are likely available from your distribution (e.g.: apt install
      libgtk-3-dev)
[✓] Android Studio (version 2024.2)
[✓] Connected device (2 available)
[✓] Network resources

! Doctor found issues in 2 categories.

Devices exhibiting the bug

Google Pixel 3a Android 12

@ryanheise
Copy link
Owner

This issue does not follow the issue template. If you click the "New issue" button, it should require you to answer a number of different questions.

@Aulig
Copy link
Author

Aulig commented Feb 14, 2025

Hmm, I don't see anything like that unfortunately

Image

@ryanheise
Copy link
Owner

Hmm, I'll have to look into that.

@ryanheise
Copy link
Owner

My template chooser config file looks correct so I'm not sure what happened. Maybe it's a GitHub fault...

Anyway, the link is here:

https://ryanheise.github.io/audio_service/issue-form/issue.html

You can use it to create a new issue with all the required information in it. When you click Submit, it will take you back to GitHub where all details you entered are formatted in a GitHub issue. At this point, you can either submit that issue to GitHub or you can copy and paste the formatted issue text from there into THIS issue to avoid creating multiple issues. You can also edit your initial post above to include the required information.

@Aulig
Copy link
Author

Aulig commented Feb 17, 2025

My template chooser config file looks correct so I'm not sure what happened. Maybe it's a GitHub fault...

Anyway, the link is here:

https://ryanheise.github.io/audio_service/issue-form/issue.html

You can use it to create a new issue with all the required information in it. When you click Submit, it will take you back to GitHub where all details you entered are formatted in a GitHub issue. At this point, you can either submit that issue to GitHub or you can copy and paste the formatted issue text from there into THIS issue to avoid creating multiple issues. You can also edit your initial post above to include the required information.

Thanks for letting me know @ryanheise ! I've updated the issue now.

@Aulig
Copy link
Author

Aulig commented Feb 28, 2025

Hi @ryanheise - hope I'm not bothering you, just want to make sure that you saw the updated issue. Let me know if there's any issues with reproducing the bug. I appreciate all the work you put into this plugin.

If you have any background info on what audio_service does regarding deep linking, that'd help me with investigating the issue further too. Thank you!

@ryanheise
Copy link
Owner

I did, I have just been busy catching up with things after having the flu for 3 weeks, so I am slowly working my way to this.

@Aulig
Copy link
Author

Aulig commented Mar 1, 2025

Thanks for letting me know! Sorry, didn't mean to pressure you. Happy to hear you're doing better again!

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

2 participants