influxdata / influxdata/influxdb-java

Crash when calling InfluxDBFactory.connect(...) on Kotlin

Open
#696 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.2k
Forks
469
PR merge metrics
No merged PRs in 30d

Description

To do a web request I have to call `InfluxDBFactory.connect(...)` from a thread.
```
Thread { InfluxDBFactory.connect(URL) }.start()
```
But this immedialtey throws

```
W/om.my.app: Accessing hidden method Ljava/lang/invoke/MethodHandles$Lookup;->(Ljava/lang/Class;I)V (greylist, reflection, allowed)
E/AndroidRuntime: FATAL EXCEPTION: Thread-6
Process: com..my.app, PID: 16619
I/Process: Sending signal. PID: 16619 SIG: 9
```

The relavant parts in my `.gradle` are as following.

```
implementation group: 'org.influxdb', name: 'influxdb-java', version: "2.20"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9"
```

and
```
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
```

Is this a bug in this library or am I missing something?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Android crash from a background thread with InfluxDBFactory.connect(URL), using influxdb-java 2.20 and the Gradle settings shown. Read the Android runtime log alongside the library's connection entry point and determine whether the failure is caused by the library or the application configuration. Done means the cause and applicable resolution or limitation are established.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, kotlin
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.