Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting reports of Attempt to invoke virtual method 'int com.mybigday.rns3.RNS3TransferUtility$CredentialType.ordinal()' on a null object reference #55

Open
ianataffinity opened this issue Sep 10, 2017 · 1 comment

Comments

@ianataffinity
Copy link

This is only happening on some Android users.

Stack trace:

com.mybigday.rns3.RNS3TransferUtility.setup RNS3TransferUtility.java:142
com.mybigday.rns3.RNS3TransferUtility.setupWithNative RNS3TransferUtility.java:199
java.lang.reflect.Method.invoke Method.java
com.facebook.react.bridge.JavaMethodWrapper.invoke JavaMethodWrapper.java:363
com.facebook.react.bridge.JavaModuleWrapper.invoke JavaModuleWrapper.java:166
com.facebook.react.bridge.queue.NativeRunnable.run NativeRunnable.java
android.os.Handler.handleCallback Handler.java:739
android.os.Handler.dispatchMessage Handler.java:95
com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage         
MessageQueueThreadHandler.java:31
android.os.Looper.loop Looper.java:148
com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run         
MessageQueueThreadImpl.java:194
java.lang.Thread.run Thread.java:818

Here is the full report off one of the crashed devices:

app-0e2665c4-6dc0-44f6-9cf5-9bf9be927738-id-6e43f461-6049-4353-a5b2-227df09dcfdd.zip

Any idea on where I can start to fix this?

@HananeAlSamrout
Copy link

add this code to MainActivity.java

import android.os.Bundle;

import com.facebook.react.ReactActivity;
import com.mybigday.rns3.RNS3TransferUtility;

public class MainActivity extends ReactActivity {

    ....

    @Override
    public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      RNS3TransferUtility.nativeCredentialsOptions.put("region", "bucket_region");
      RNS3TransferUtility.nativeCredentialsOptions.put("type", RNS3TransferUtility.CredentialType.BASIC);
      RNS3TransferUtility.nativeCredentialsOptions.put("access_key", "your_access_key");
      RNS3TransferUtility.nativeCredentialsOptions.put("secret_key", "your_secret_key");
    }

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants