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.

NumberFormatException during DB import

See original GitHub issue

Describe the bug After starting the App several times I get a NumberFormatException during the import of the db.

To Reproduce Steps to reproduce the behavior: Build and deploy the App several times via Android Studio. I don’t know if this also happens in the Sample app. The only solution of this is to clear all data of the app.

Expected behavior Don’t crash during db import.

Platform details:

  • Device: Huawei P9, Pixel 3a
  • OS: Android 7.0, Android 10
  • Library Version 2.3.1

Logs / Screenshots E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1 Process: ********, PID: 21154 java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:330) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354) at java.util.concurrent.FutureTask.setException(FutureTask.java:223) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:255) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:776) Caused by: java.lang.NumberFormatException: For input string: "422802952" at java.lang.Integer.parseInt(Integer.java:524) at no.nordicsemi.android.mesh.transport.ElementDbMigrator.deserialize(ElementDbMigrator.java:34) at no.nordicsemi.android.mesh.transport.ElementDbMigrator.deserialize(ElementDbMigrator.java:20) at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41) at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:187) at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145) at com.google.gson.Gson.fromJson(Gson.java:932) at com.google.gson.Gson.fromJson(Gson.java:897) at com.google.gson.Gson.fromJson(Gson.java:846) at no.nordicsemi.android.mesh.MeshTypeConverters.fromJsonToElements(MeshTypeConverters.java:54) at no.nordicsemi.android.mesh.data.ProvisionedMeshNodesDao_Impl.getNodes(ProvisionedMeshNodesDao_Impl.java:684) at no.nordicsemi.android.mesh.MeshNetworkDb$LoadNetworkAsyncTask.doInBackground(MeshNetworkDb.java:360) at no.nordicsemi.android.mesh.MeshNetworkDb$LoadNetworkAsyncTask.doInBackground(MeshNetworkDb.java:325) at android.os.AsyncTask$2.call(AsyncTask.java:316) at java.util.concurrent.FutureTask.run(FutureTask.java:237)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
roshanrajaratnamcommented, Oct 20, 2020

I’ll keep an eye on this.

0reactions
TungKLcommented, May 24, 2021

@roshanrajaratnam In there are the DB files I copied from the Device File Explorer in Android Studio. The app was in the same error state as described earlier.

mesh_network_database.zip

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error on database import - NumberFormatException: For input ...
Importing records...Error on database import happened just before line 0, column 50330 com.orientechnologies.orient.core.db.tool.
Read more >
java.lang.NumberFormatException in jdbc project
a NumberFormatException is an Exception that might be thrown when you try to convert a String into a number, where that number might...
Read more >
NumberFormatException while inserting data into database
I have a “Editors” table in database with following columns:. ... import java.util.Date; ... NumberFormatException: null java.lang.Long.
Read more >
NumberFormatException fails in database - Oracle Communities
I have a Java stored procedure that uses the java.lang.NumberFormatException. The stored procedure worked on Oracle Db 8.1.7 but fails on ...
Read more >
Project import fails with NumberFormatException in Jira ...
DefaultBackupXmlParser] Unexpected import failure java.lang.NumberFormatException: null at java.lang.Long.parseLong(Unknown Source) at ...
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