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.

Error on Android after call to saveDate

See original GitHub issue

I commented on #23, but I’m seeing a native error when trying to make a call to RNCalendarEvents.saveEvent on Android. cc @lilach

Here’s the stack trace, although it probably isn’t very insightful.

Error: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getLastPathSegment()' on a null object reference
    at createErrorFromErrorData (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:7099:11)
    at http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:7062:35
    at MessageQueue.__invokeCallback (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:7442:10)
    at http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:7294:8
    at guard (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:7213:1)
    at MessageQueue.invokeCallbackAndReturnFlushedQueue (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:7293:1)
    at onmessage (http://localhost:8081/debuggerWorker.js:44:56)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
alexwmidascommented, Nov 8, 2016

I passed that issue by changing the date format on javascript side like below. if (Platform.OS !== ‘android’) { return makeUppercase(moment(startDate).utc().format(“YYYY-MM-DTHH:mm:ss.SSS”) + “UTC”);
} else { return makeUppercase(moment(startDate).utc().format(“YYYY-MM-DTHH:mm:ss.SSS”) + ‘Z’); }

0reactions
MoOxcommented, Dec 7, 2020

It seems only dates in UTC are accepted. I got this issue myself yesterday. Another option is to send timestamp as float.

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - Error when trying to save data - Stack Overflow
The app runs fine at the first run after deleting previous data. It crashes when it runs second time and has to take...
Read more >
Save UI states - Android Developers
Learn how to preserve your UI state across config changes.
Read more >
Crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal.
Read more >
Saving state with fragments - Android Developers
To ensure the user's state is saved, the Android framework automatically saves and restores the fragments and the back stack. Therefore, you ...
Read more >
Saved State module for ViewModel - Android Developers
These values persist after the process is killed by the system and remain ... When SavedStateHandle is ready to save its state, it...
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