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: Android crash NullPointerException: Attempt to invoke virtual method when clicking phone or email link #6507

Closed
tobiasmuecksch opened this issue Apr 17, 2023 · 3 comments

Comments

@tobiasmuecksch
Copy link

tobiasmuecksch commented Apr 17, 2023

Bug Report

Capacitor Version

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 4.7.3
  @capacitor/core: 4.7.3
  @capacitor/android: 4.7.3
  @capacitor/ios: 4.7.3

Installed Dependencies:

  @capacitor/ios: not installed
  @capacitor/core: 4.7.3
  @capacitor/android: 4.7.3
  @capacitor/cli: 4.7.3

[success] Android looking great! 👌

Platform(s)

  • Android

Current Behavior

When the user clicks on a link, which references a phone number or an email address the app crashes.

  <a href="tel:12345678">Call: 12345678</a><br><br>
  <a href="mailto:info@example.com">Mail To: info@example.com</a>

Expected Behavior

Well, the app shouldn't crash, and instead start a phone call or open a mail program ;-)

Code Reproduction

I've created a reproduction repo, which you can find here:

https://github.com/tobiasmuecksch/cap-link-crash-demo

Just clone it, run it an click on one of the links on page 1.

If you prefer to create your own reproduction code, you only need to add the following lines to one of your components:

  <a href="tel:12345678">Call: 12345678</a><br><br>
  <a href="mailto:info@example.com">Mail To: info@example.com</a>

Other Technical Details

npm --version output:
9.5.0

node --version output:
v18.15.0

Stack Trace

image

Potential Error Source

It looks like this might be the line, where the error occurs, but I'm not sure yet.

Bildschirmfoto 2023-04-17 um 13 09 29

@tobiasmuecksch
Copy link
Author

This is NOT a duplicate of #6479
The stack trace is completely different.

@jcesarmobile
Copy link
Member

duplicate of #6483

@jcesarmobile jcesarmobile closed this as not planned Won't fix, can't repro, duplicate, stale Apr 17, 2023
@ionitron-bot
Copy link

ionitron-bot bot commented May 17, 2023

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators May 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants