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

Error in LocationProbeSensor (seems like conflicting dependencies) #49

Open
2 of 7 tasks
william-vw opened this issue May 28, 2021 · 1 comment
Open
2 of 7 tasks
Labels

Comments

@william-vw
Copy link
Contributor

Describe the bug

Getting the following error when dragging a LocationProbeSensor onto the screen:

java.lang.NoSuchMethodError: No direct method (Lcom/google/gson/internal/ConstructorConstructor;Lcom/google/gson/FieldNamingStrategy;Lcom/google/gson/internal/Excluder;)V in class Lcom/google/gson/internal/bind/ReflectiveTypeAdapterFactory; or its super classes (declaration of 'com.google.gson.internal.bind.ReflectiveTypeAdapterFactory' appears in /data/app/~~cF5gEuahOyoqw4HVEvaB_w==/edu.mit.appinventor.punya.aicompanion3-V4hOJ9dUWuUw_fDdj9WEFg==/base.apk!classes2.dex)
05-28 09:21:23.969 19223 19223 E AndroidRuntime: at edu.mit.media.funf.config.ConfigurableTypeAdapterFactory.(ConfigurableTypeAdapterFactory.java:48)
05-28 09:21:23.969 19223 19223 E AndroidRuntime: at edu.mit.media.funf.FunfManager.getProbeFactory(FunfManager.java:410)
05-28 09:21:23.969 19223 19223 E AndroidRuntime: at edu.mit.media.funf.FunfManager.getGsonBuilder(FunfManager.java:361)
05-28 09:21:23.969 19223 19223 E AndroidRuntime: at edu.mit.media.funf.FunfManager.getGsonBuilder(FunfManager.java:352)
05-28 09:21:23.969 19223 19223 E AndroidRuntime: at edu.mit.media.funf.FunfManager.getGson(FunfManager.java:381)
05-28 09:21:23.969 19223 19223 E AndroidRuntime: at edu.mit.media.funf.FunfManager.onCreate(FunfManager.java:129)
05-28 09:21:23.969 19223 19223 E AndroidRuntime: at android.app.ActivityThread.handleCreateService(ActivityThread.java:4192)
05-28 09:21:23.969 19223 19223 E AndroidRuntime: at android.app.ActivityThread.access$1500(ActivityThread.java:237)
05-28 09:21:23.969 19223 19223 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
05-28 09:21:23.969 19223 19223 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
05-28 09:21:23.969 19223 19223 E AndroidRuntime: at android.os.Looper.loop(Looper.java:223)
05-28 09:21:23.969 19223 19223 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7656)
05-28 09:21:23.969 19223 19223 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
05-28 09:21:23.969 19223 19223 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
05-28 09:21:23.969 19223 19223 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

It seems that there are conflicting dependencies - in particular keyczar includes com.google.json classes that lack the registerTypeAdapterFactory.

Affects

LocationProbeSensor

  • Designer
  • Blocks editor
  • Companion
  • Compiled apps
  • Buildserver
  • Debugging
  • Other... (please describe)

Expected behavior

To not get an error message, I suppose.

Steps to reproduce

Drag and drop a LocationProbeSensor onto the screen in the public Punya instance, and connect to the MIT Punya Companion.

@william-vw william-vw added the bug label May 28, 2021
@william-vw
Copy link
Contributor Author

Note that keyczar is deprecated and the developers recommend using tink: https://github.com/google/keyczar

Tink has an explicit dependency on gson so it shouldn't cause the same issues.

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

No branches or pull requests

1 participant