GithubHelp home page GithubHelp logo

kenyee / java-ddp-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kutrumbo/java-ddp-client

67.0 67.0 20.0 1.13 MB

A DDP client written in java for the Meteor framework (https://github.com/meteor/meteor)

License: Other

Java 100.00%

java-ddp-client's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

java-ddp-client's Issues

Java-WebSocket 1.3.3 doesn't exist on maven

On maven you've specified

<dependency>
   <groupId>org.java-websocket</groupId>
   <artifactId>Java-WebSocket</artifactId>
   <version>1.3.3</version>
   <scope>test</scope>
</dependency>

but this version doesn't exist :

Failed to execute goal on project java-rrw: Could not resolve dependencies for project org.kde.brooklyn:java-rrw:jar:1.0-SNAPSHOT: Failure to find org.java-websocket:java-websocket:jar:1.3.3 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

It should be

<dependency>
   <groupId>org.java-websocket</groupId>
   <artifactId>Java-WebSocket</artifactId>
   <version>1.3.4</version>
   <scope>test</scope>
</dependency>

Regarding resume login with stored token

I m using ddp lib to login to ddp server via native android app.
I m facing a strange scenario..
I log in successfully and get authtoken returned . I saved this authtoken to my local storage. i can subscribe successfully to my lists now. Now After I try to resume login with my already saved token .. i get phone no verified true returned from server . but after that i can't be able to subscribe to lists again.

Am i missing something in the flow to resume login with saved token ? .

Thanks

Class not found: WebSocketClient

Whenever I try to establish a DDPClient, I get the following error.

Exception in thread "ServerEngine" java.lang.NoClassDefFoundError: org/java_websocket/client/WebSocketClient

I establish the DDPClient as follows:

DDPClient ddp = new DDPClient("localhost", 3000);

My meteor server is running on localhost:3000. Any help appreciated!

Where can I find the Meteor server app code for testing

I am looking at running the Unit tests on this Java DDP client package.
I started down the path of creating a Meteor server app, adding accounts-password, etc, but it seems like it would be easier to use an existing Meteor server app.
Can you point me to one?

I want to look at Java-WebSocket 1.3.0 code. From my past experience, that project has intermittent bugs, like duplicated messages or flaking out when the data payload is larger than some 100KB or so. Curious if you have seen issues. (I've had much better luck with Tyrus Java WebSocket).

Thanks.

SSL Stack Overflow Crash on Android 4.x

If SSL is enabled when using your android-ddp-client library (which uses java-ddp-client), there is a stack overflow crash on Android 4.x devices. (See: kenyee/android-ddp-client#28)

05-02 16:30:12.372 25945-26349/com.workpop.app.debug E/AndroidRuntime: FATAL EXCEPTION: Thread-1547 java.lang.StackOverflowError at org.apache.harmony.xnet.provider.jsse.OpenSSLCipher.getOutputSize(OpenSSLCipher.java:197) at org.apache.harmony.xnet.provider.jsse.OpenSSLCipher.engineGetOutputSize(OpenSSLCipher.java:209) at javax.crypto.Cipher.getOutputSize(Cipher.java:402) at org.apache.harmony.xnet.provider.jsse.ConnectionState.getMinFragmentSize(ConnectionState.java:69) at org.apache.harmony.xnet.provider.jsse.SSLRecordProtocol.getMinRecordSize(SSLRecordProtocol.java:134) at org.apache.harmony.xnet.provider.jsse.SSLEngineImpl.unwrap(SSLEngineImpl.java:435) at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:383) at org.java_websocket.SSLSocketChannel2.unwrap(SSLSocketChannel2.java:150) at org.java_websocket.SSLSocketChannel2.readRemaining(SSLSocketChannel2.java:254) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:220) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel2.java:241) at org.java_websocket.SSLSocketChannel2.read(SSLSocketChannel

The crash happens in the java-websocket 1.3.0 dependency. It looks like this may be fixed in the latest version, 1.3.3 (see: TooTallNate/Java-WebSocket#190
). I tried forcing a dependency substitution in order to pick up any fixes as follows:

configurations.all {
    resolutionStrategy {
        resolutionStrategy.dependencySubstitution {
            substitute module("org.java-websocket:Java-WebSocket:1.3.0") with module("org.java-websocket:java-websocket:1.3.3")
       }
    }
}

Unfortunately, the newest version of the java-websocket library has a breaking API change and removes a class that DDPClient relies on. That means the dependency substitution will not work.

One solution would be to update java-ddp-client that uses the latest version of java-websocket. This would also require a one line change to DDPClient so that it no longer uses the removed class. It is an easy one line change to update DDPClient so it no longer relies on the class. See TooTallNate/Java-WebSocket#425 and the example code the last post references to see how https://github.com/TooTallNate/Java-WebSocket/blob/master/src/main/example/SSLClientExample.java

Login funciton

Hello, I try to use your login funtion ddp.call("login" ....
final HashMap auth = new HashMap();
auth.put("email", "myMailAdress");
auth.put("password", "myMailPassword");
Object[] methodArgs = new Object[1];
methodArgs[0] = auth;

But I have an error :
Server log ๐ŸŽฑ
Exception while invoking method 'login' Error: Match error: Unknown key in field email
I20150317-18:10:55.115(1)? at packages/check/match.js:299:1
I20150317-18:10:55.115(1)? at Function..each..forEach (packages/underscore/underscore.js:113:1)
I20150317-18:10:55.115(1)? at checkSubtree (packages/check/match.js:290:1)
I20150317-18:10:55.115(1)? at check (packages/check/match.js:32:1)
I20150317-18:10:55.115(1)? at [object Object].Accounts.registerLoginHandler.check.user (packages/accounts-password/password_server.js:144:1)
I20150317-18:10:55.115(1)? at packages/accounts-base/accounts_server.js:383:1
I20150317-18:10:55.115(1)? at tryLoginMethod (packages/accounts-base/accounts_server.js:186:1)
I20150317-18:10:55.115(1)? at runLoginHandlers (packages/accounts-base/accounts_server.js:380:1)
I20150317-18:10:55.115(1)? at [object Object].Meteor.methods.login (packages/accounts-base/accounts_server.js:434:1)
I20150317-18:10:55.115(1)? at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1599:1)
I20150317-18:10:55.116(1)? Sanitized and reported to the client as: Match failed [400]

Can you help me ?

Async await

Hello :)

I was wondering if it is possible to use something like async await (or promises) for the callback (onResult) functions. This would be necessary in on of our projects. If yes how would it look like. We experimented with the java.util.concurrent.Future package but it did not the trick. We would really appreciate your help.

Greetings

Use SSL error?

This is a weird issue which I am not able to pinpoint yet.

It goes like this:

  1. On first try to initwebsocket with useSSL = true
  2. Can connect and all is fine
  3. close websocket
  4. 2nd time initwebsocket with useSSL = true
  5. Receive error:
    (a) draft org.java_websocket.drafts.Draft_10@7847e63f refuses handshake

Do you have any idea why or what happened?

Regarding resume login with stored token

Hello

Sometimes I can resume login with stored token at that time i receive Message ADDED response from websocket and automatically after that my subscribe lists are listed whereas sometimes resume with login doesn't work and i don't get Message ADDED and eventually screen becomes empty. Does anyone have any Idea regarding this ?

Docker and DDP

Hello there !
Hello I am accessing to a meteor container from a J2EE container and it fails because there are some trouble at the connection with the server name (corresponding to "meteor" in my compose file) and the port "82".
In this case it doesn't take into account the port and it replaces it with 80.... so the connection fails...

Ability to use a single object as parameter in methods and subscriptions

Hi,

We have a guide in meteor that suggests to use a single object as a parameter in method calls and subscriptions. Since that, I built every method or subscription this way:

Meteor.methods({
  'iterations.insert'({ uuid, name }) {
    const _iteration = Iterations.findOne({ uuid });
    if (_iteration) {
      return _iteration._id;
    }
    return Iterations.insert({ uuid, name });
  }
});

It's not possible, because the client.call that's implemented in this project receives a array of objects Object[] and pass it as parameters building a json like this:
params: ["uuid", "name"].

It should be possible as well to pass a single object to client.call but I don't know if its going to build this:
params: [{uuid: "uuid", name: "name"}]
or this
params: {uuid: "uuid", name: "name"}

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.