GithubHelp home page GithubHelp logo

Comments (5)

martinpaljak avatar martinpaljak commented on August 22, 2024

Giving context about your java and environment in general will probably help?

from rethinkdb-java.

PXNX avatar PXNX commented on August 22, 2024

I'm using Kotlin 1.4.32 for this and Android-Studio 4.2 (shouldn't really make a difference).
It's run on various virtual and physical devices running Android 9-11.

find the MWE here:
https://github.com/PXNX/RethinkAndroidTest

full stacktrace:

com.rethinkdb.gen.exc.ReqlDriverError: java.security.spec.InvalidKeySpecException: Could not generate secret key
        at com.rethinkdb.net.HandshakeProtocol$WaitingForAuthResponse$PBKDF2.compute(HandshakeProtocol.java:255)
        at com.rethinkdb.net.HandshakeProtocol$WaitingForAuthResponse$PBKDF2$$ExternalSyntheticLambda0.apply(Unknown Source:2)
        at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1716)
        at com.rethinkdb.net.HandshakeProtocol$WaitingForAuthResponse$PBKDF2.compute(HandshakeProtocol.java:213)
        at com.rethinkdb.net.HandshakeProtocol$WaitingForAuthResponse.nextState(HandshakeProtocol.java:161)
        at com.rethinkdb.net.HandshakeProtocol.doHandshake(HandshakeProtocol.java:51)
        at com.rethinkdb.net.Connection.lambda$connectAsync$0$Connection(Connection.java:131)
        at com.rethinkdb.net.Connection$$ExternalSyntheticLambda1.apply(Unknown Source:4)
        at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:612)
        at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:587)
        at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:484)
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1632)
        at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1619)
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:285)
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1155)
        at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1993)
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1941)
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
     Caused by: java.security.spec.InvalidKeySpecException: Could not generate secret key
        at javax.crypto.SecretKeyFactory.generateSecret(SecretKeyFactory.java:535)
        at com.rethinkdb.net.HandshakeProtocol$WaitingForAuthResponse$PBKDF2.compute(HandshakeProtocol.java:253)
        at com.rethinkdb.net.HandshakeProtocol$WaitingForAuthResponse$PBKDF2$$ExternalSyntheticLambda0.apply(Unknown Source:2) 
        at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1716) 
        at com.rethinkdb.net.HandshakeProtocol$WaitingForAuthResponse$PBKDF2.compute(HandshakeProtocol.java:213) 
        at com.rethinkdb.net.HandshakeProtocol$WaitingForAuthResponse.nextState(HandshakeProtocol.java:161) 
        at com.rethinkdb.net.HandshakeProtocol.doHandshake(HandshakeProtocol.java:51) 
        at com.rethinkdb.net.Connection.lambda$connectAsync$0$Connection(Connection.java:131) 
        at com.rethinkdb.net.Connection$$ExternalSyntheticLambda1.apply(Unknown Source:4) 
        at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:612) 
        at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:587) 
        at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:484) 
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1632) 
        at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1619) 
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:285) 
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1155) 
        at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1993) 
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1941) 
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) 
     Caused by: java.lang.IllegalArgumentException: password empty
        at com.android.org.bouncycastle.jcajce.provider.symmetric.PBEPBKDF2$BasePBKDF2.engineGenerateSecret(PBEPBKDF2.java:237)
        at javax.crypto.SecretKeyFactory.generateSecret(SecretKeyFactory.java:524)
        at com.rethinkdb.net.HandshakeProtocol$WaitingForAuthResponse$PBKDF2.compute(HandshakeProtocol.java:253) 
        at com.rethinkdb.net.HandshakeProtocol$WaitingForAuthResponse$PBKDF2$$ExternalSyntheticLambda0.apply(Unknown Source:2) 
        at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1716) 
        at com.rethinkdb.net.HandshakeProtocol$WaitingForAuthResponse$PBKDF2.compute(HandshakeProtocol.java:213) 
        at com.rethinkdb.net.HandshakeProtocol$WaitingForAuthResponse.nextState(HandshakeProtocol.java:161) 
        at com.rethinkdb.net.HandshakeProtocol.doHandshake(HandshakeProtocol.java:51) 
        at com.rethinkdb.net.Connection.lambda$connectAsync$0$Connection(Connection.java:131) 
        at com.rethinkdb.net.Connection$$ExternalSyntheticLambda1.apply(Unknown Source:4) 
        at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:612) 
        at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:587) 
        at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:484) 
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1632) 
        at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1619) 
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:285) 
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1155) 
        at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1993) 
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1941) 
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) 

from rethinkdb-java.

rohitsangwan01 avatar rohitsangwan01 commented on August 22, 2024

@PXNX Am Doing Exactly Same Steps , But Getting Same error in Android , its Working fine in Normal Java Project and in Flutter also Dart version Working Fine ,But Getting This in Android only , my tetsing Android Version is 10, Found Any Solution??

from rethinkdb-java.

PXNX avatar PXNX commented on August 22, 2024

@rohitsangwan01
Seems like you have to add a user to it.

for example:
r.connection().hostname("some-url.com").port(42069).user("bob", "salat").connect()

This was not mentioned in the guide though :(

Find the full code here:
https://github.com/PXNX/RethinkAndroidTest

  • once again with DUC to access my IP via some URL
  • with the required port rule being set in my router, 42069 worked for me
  • with the user existing in that database (and possible with a password in use)

I also recommend you to use reQL-pro to edit your database

from rethinkdb-java.

rohitsangwan01 avatar rohitsangwan01 commented on August 22, 2024

@PXNX ,Thanks man,
so is it working for you in Android ??,.
Just Checked , Great ,its Working Fine ,
waisted almost 2 hours , they should atleast write a line in docs about t ,
Thanks again man

from rethinkdb-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.