question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

attempt to invoke virtual method 'boolean java.lang.string.endtswith(java.lang.string) on a null object reference" ==> when i use linking from react-native

See original GitHub issue

android only, iso working perfect

i upgrade my expo project to “expo”: “^27.0.0”, and when useing linking to open Url or tel:number that issue shown to me:

attempt to invoke virtual method 'boolean java.lang.string.endtswith(java.lang.string) on a null object reference

using:

"expo": "^27.0.0",
"react": "16.3.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-27.0.0.tar.gz"

my code:

console.log('Trying to access url')
let url = "https://expo.io"

try {
  Linking.canOpenURL(url).then(supported => {
     if (!supported) {
     console.log('Can\'t handle url: ' + url)
     } else {
        return Linking.openURL(url)
     }
  }).catch(err => console.error('An error occurred', err))
  }catch(err) {
     console.log('why this fucken not working', err)
  }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
FakhruddinAbdicommented, May 9, 2018

as we can not set android permission call_phone using expo so there’s no solution in my side @AbdelhalimAhmed yet

0reactions
terriblebencommented, May 14, 2018

No problem - we’ll continue tracking in the other thread. I believe a fix is pending.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Attempt to invoke virtual method 'boolean java.lang.String ...
I am running the Android application with react-native run-android. The application crashing at the entry with the following error Attempt ...
Read more >
NullPointerException: Attempt to invoke virtual method ...
NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equalsIgnoreCase(java.lang.String)' on a null object reference ...
Read more >
React Native Error: Attempt to invoke virtual method 'int java ...
React Native Error: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference.
Read more >
attempt to invoke virtual method boolean com.facebook.react ...
facebook/react-nativeAttempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference#18397.
Read more >
Fixed Error android error attempt to invoke virtual method
Need Help or Code Support? Feel Free To Contact Us Here http://www.aaviskar.com/support.phpThis video is about Fixed Error android error ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found