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

Android: Bug Reporting / Log Capture Framework #992

Merged
merged 6 commits into from Mar 1, 2017

Conversation

Projects
None yet
2 participants
@dosiecki
Collaborator

dosiecki commented Mar 1, 2017

A super-lightweight logging interceptor to enable users send us logs on demand via email with no dependencies on any platform logging pipeline. Enrolled any logging that might be relevant to our two open high-priority bugs that we cannot reproduce.

As soon as this gets to Beta, we can engage with users experiencing the bugs and have them send us some info that might help us resolve things. It is crucial that we communicate to users that they send us a bug report as soon as they experience the bug, to ensure freshest data. Wouldn't recommend pushing this all the way to Prod until it has been well smoke-tested in Beta.

@dosiecki dosiecki added the android label Mar 1, 2017

@samuelclay samuelclay merged commit 11a6abb into samuelclay:master Mar 1, 2017

@samuelclay

This comment has been minimized.

Show comment
Hide comment
@samuelclay

samuelclay Mar 1, 2017

Owner

Well that didn't work but I bet it's because I'm on my laptop and have never built on it before. I don't want to wait until Monday, any chance you know right off the bat what the issue is here? Googling didn't help.

(added screenshot)
screen shot 2017-03-01 at mar 1 4 58 10 pm

Owner

samuelclay commented Mar 1, 2017

Well that didn't work but I bet it's because I'm on my laptop and have never built on it before. I don't want to wait until Monday, any chance you know right off the bat what the issue is here? Googling didn't help.

(added screenshot)
screen shot 2017-03-01 at mar 1 4 58 10 pm

@dosiecki

This comment has been minimized.

Show comment
Hide comment
@dosiecki

dosiecki Mar 1, 2017

Collaborator

v0.8.4 of AS is probably much too old to build a modern project. (in this case, it ignoring our build files and trying to default to a half-decade old version of Java for some reason) Any reasonably modern version of AS should work better, or I believe you can grab gradle from homebrew and do a quick and dirty commandline build.

If nothing else, the F-Droid autobuilder should issue a new release as soon as we bump the version number in the manifest and it will be autodeployed there within a day or so.

Collaborator

dosiecki commented Mar 1, 2017

v0.8.4 of AS is probably much too old to build a modern project. (in this case, it ignoring our build files and trying to default to a half-decade old version of Java for some reason) Any reasonably modern version of AS should work better, or I believe you can grab gradle from homebrew and do a quick and dirty commandline build.

If nothing else, the F-Droid autobuilder should issue a new release as soon as we bump the version number in the manifest and it will be autodeployed there within a day or so.

@samuelclay

This comment has been minimized.

Show comment
Hide comment
@samuelclay

samuelclay Mar 2, 2017

Owner

Haha, AS told me it was the latest version. I think the wifi at the cafe I was at was a little borked, because I couldn't get my iOS builds authenticated either.

Owner

samuelclay commented Mar 2, 2017

Haha, AS told me it was the latest version. I think the wifi at the cafe I was at was a little borked, because I couldn't get my iOS builds authenticated either.

@samuelclay

This comment has been minimized.

Show comment
Hide comment
@samuelclay

samuelclay Mar 2, 2017

Owner

I'm having trouble getting around this error. Should I be on JDK 1.6, 1.7, or 1.8? I only have 1.6 and 1.7 installed.

Error:Internal error: (java.lang.UnsupportedClassVersionError) org/jetbrains/jps/android/model/impl/JpsAndroidModelSerializerExtension : Unsupported major.minor version 52.0
java.lang.UnsupportedClassVersionError: org/jetbrains/jps/android/model/impl/JpsAndroidModelSerializerExtension : Unsupported major.minor version 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:274)
	at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:363)
	at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
	at com.intellij.util.containers.ContainerUtilRt.copy(ContainerUtilRt.java:179)
	at com.intellij.util.containers.ContainerUtilRt.newArrayList(ContainerUtilRt.java:168)
	at org.jetbrains.jps.plugin.impl.JpsPluginManagerImpl.loadExtensions(JpsPluginManagerImpl.java:18)
	at org.jetbrains.jps.service.impl.JpsServiceManagerImpl.getExtensions(JpsServiceManagerImpl.java:59)
	at org.jetbrains.jps.model.serialization.JpsModelSerializerExtension.getExtensions(JpsModelSerializerExtension.java:46)
	at org.jetbrains.jps.model.serialization.library.JpsSdkTableSerializer.getSdkPropertiesSerializer(JpsSdkTableSerializer.java:205)
	at org.jetbrains.jps.model.serialization.library.JpsSdkTableSerializer.loadSdk(JpsSdkTableSerializer.java:99)
	at org.jetbrains.jps.model.serialization.library.JpsSdkTableSerializer.loadSdks(JpsSdkTableSerializer.java:80)
	at org.jetbrains.jps.model.serialization.JpsGlobalLoader$SdkTableSerializer.loadExtension(JpsGlobalLoader.java:144)
	at org.jetbrains.jps.model.serialization.JpsGlobalLoader$SdkTableSerializer.loadExtension(JpsGlobalLoader.java:137)
	at org.jetbrains.jps.model.serialization.JpsLoaderBase.loadComponents(JpsLoaderBase.java:61)
	at org.jetbrains.jps.model.serialization.JpsGlobalLoader.loadGlobalComponents(JpsGlobalLoader.java:83)
	at org.jetbrains.jps.model.serialization.JpsGlobalLoader.load(JpsGlobalLoader.java:73)
	at org.jetbrains.jps.model.serialization.JpsGlobalLoader.loadGlobalSettings(JpsGlobalLoader.java:59)
	at org.jetbrains.jps.model.serialization.impl.JpsSerializationManagerImpl.loadModel(JpsSerializationManagerImpl.java:38)
	at org.jetbrains.jps.cmdline.JpsModelLoaderImpl.loadModel(JpsModelLoaderImpl.java:45)
	at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:78)
	at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:266)
	at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)
	at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:232)
	at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:44)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Owner

samuelclay commented Mar 2, 2017

I'm having trouble getting around this error. Should I be on JDK 1.6, 1.7, or 1.8? I only have 1.6 and 1.7 installed.

Error:Internal error: (java.lang.UnsupportedClassVersionError) org/jetbrains/jps/android/model/impl/JpsAndroidModelSerializerExtension : Unsupported major.minor version 52.0
java.lang.UnsupportedClassVersionError: org/jetbrains/jps/android/model/impl/JpsAndroidModelSerializerExtension : Unsupported major.minor version 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:274)
	at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:363)
	at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
	at com.intellij.util.containers.ContainerUtilRt.copy(ContainerUtilRt.java:179)
	at com.intellij.util.containers.ContainerUtilRt.newArrayList(ContainerUtilRt.java:168)
	at org.jetbrains.jps.plugin.impl.JpsPluginManagerImpl.loadExtensions(JpsPluginManagerImpl.java:18)
	at org.jetbrains.jps.service.impl.JpsServiceManagerImpl.getExtensions(JpsServiceManagerImpl.java:59)
	at org.jetbrains.jps.model.serialization.JpsModelSerializerExtension.getExtensions(JpsModelSerializerExtension.java:46)
	at org.jetbrains.jps.model.serialization.library.JpsSdkTableSerializer.getSdkPropertiesSerializer(JpsSdkTableSerializer.java:205)
	at org.jetbrains.jps.model.serialization.library.JpsSdkTableSerializer.loadSdk(JpsSdkTableSerializer.java:99)
	at org.jetbrains.jps.model.serialization.library.JpsSdkTableSerializer.loadSdks(JpsSdkTableSerializer.java:80)
	at org.jetbrains.jps.model.serialization.JpsGlobalLoader$SdkTableSerializer.loadExtension(JpsGlobalLoader.java:144)
	at org.jetbrains.jps.model.serialization.JpsGlobalLoader$SdkTableSerializer.loadExtension(JpsGlobalLoader.java:137)
	at org.jetbrains.jps.model.serialization.JpsLoaderBase.loadComponents(JpsLoaderBase.java:61)
	at org.jetbrains.jps.model.serialization.JpsGlobalLoader.loadGlobalComponents(JpsGlobalLoader.java:83)
	at org.jetbrains.jps.model.serialization.JpsGlobalLoader.load(JpsGlobalLoader.java:73)
	at org.jetbrains.jps.model.serialization.JpsGlobalLoader.loadGlobalSettings(JpsGlobalLoader.java:59)
	at org.jetbrains.jps.model.serialization.impl.JpsSerializationManagerImpl.loadModel(JpsSerializationManagerImpl.java:38)
	at org.jetbrains.jps.cmdline.JpsModelLoaderImpl.loadModel(JpsModelLoaderImpl.java:45)
	at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:78)
	at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:266)
	at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)
	at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:232)
	at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:44)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
@dosiecki

This comment has been minimized.

Show comment
Hide comment
@dosiecki

dosiecki Mar 2, 2017

Collaborator

Our project should build under 7 or 8, and our build file should take care of getting the right one(s).

That error, however, is something failing in the AS internals. It isn't even in the build process yet.

Collaborator

dosiecki commented Mar 2, 2017

Our project should build under 7 or 8, and our build file should take care of getting the right one(s).

That error, however, is something failing in the AS internals. It isn't even in the build process yet.

@samuelclay

This comment has been minimized.

Show comment
Hide comment
@samuelclay

samuelclay Mar 2, 2017

Owner

Ok, I'll install JDK 8.

Owner

samuelclay commented Mar 2, 2017

Ok, I'll install JDK 8.

@dosiecki

This comment has been minimized.

Show comment
Hide comment
@dosiecki

dosiecki Mar 2, 2017

Collaborator

On some platforms, at least, the full AS installer should take care of runtimes for you.

Collaborator

dosiecki commented Mar 2, 2017

On some platforms, at least, the full AS installer should take care of runtimes for you.

@samuelclay

This comment has been minimized.

Show comment
Hide comment
@samuelclay

samuelclay Mar 2, 2017

Owner

Ok, back to the original error with JDK 8:

/Users/sclay/projects/newsblur/clients/android/NewsBlur/src/com/newsblur/util/Log.java
Error:(104, 17) java: try-with-resources is not supported in -source 1.6
  (use -source 7 or higher to enable try-with-resources)
Owner

samuelclay commented Mar 2, 2017

Ok, back to the original error with JDK 8:

/Users/sclay/projects/newsblur/clients/android/NewsBlur/src/com/newsblur/util/Log.java
Error:(104, 17) java: try-with-resources is not supported in -source 1.6
  (use -source 7 or higher to enable try-with-resources)
@dosiecki

This comment has been minimized.

Show comment
Hide comment
@dosiecki

dosiecki Mar 2, 2017

Collaborator

That error says you are still using 6. Might need to direct AS to your install paths?

Collaborator

dosiecki commented Mar 2, 2017

That error says you are still using 6. Might need to direct AS to your install paths?

@samuelclay

This comment has been minimized.

Show comment
Hide comment
@samuelclay

samuelclay Mar 2, 2017

Owner

It says it's using 1.8 in the full output. I double checked and everything in the project settings dialog looks correct:

Information:Using javac 1.8.0_121 to compile java sources
Information:java: Errors occurred while compiling module 'NewsBlur'
Information:Module "NewsBlur" was fully rebuilt due to project configuration/dependencies changes
Information:3/2/17, 3:54 PM - Compilation completed with 1 error and 0 warnings in 14s 509ms
/Users/sclay/projects/newsblur/clients/android/NewsBlur/src/com/newsblur/util/Log.java
Error:(104, 17) java: try-with-resources is not supported in -source 1.6
  (use -source 7 or higher to enable try-with-resources)
Owner

samuelclay commented Mar 2, 2017

It says it's using 1.8 in the full output. I double checked and everything in the project settings dialog looks correct:

Information:Using javac 1.8.0_121 to compile java sources
Information:java: Errors occurred while compiling module 'NewsBlur'
Information:Module "NewsBlur" was fully rebuilt due to project configuration/dependencies changes
Information:3/2/17, 3:54 PM - Compilation completed with 1 error and 0 warnings in 14s 509ms
/Users/sclay/projects/newsblur/clients/android/NewsBlur/src/com/newsblur/util/Log.java
Error:(104, 17) java: try-with-resources is not supported in -source 1.6
  (use -source 7 or higher to enable try-with-resources)
@samuelclay

This comment has been minimized.

Show comment
Hide comment
@samuelclay

samuelclay Mar 3, 2017

Owner

I'm just going to wait until Monday when I can crosscheck with my office Mac.

Owner

samuelclay commented Mar 3, 2017

I'm just going to wait until Monday when I can crosscheck with my office Mac.

@dosiecki

This comment has been minimized.

Show comment
Hide comment
@dosiecki

dosiecki Mar 10, 2017

Collaborator

Your AS install is definitely doing something odd. This first line says it is using Java 8:

Using javac 1.8.0_121 to compile java sources

But then the last line says you are using Java 6:

java: try-with-resources is not supported in -source 1.6

I will update our build config shortly to be a bit more strict about requiring a specific java version, which might get AS to spit out a more sensible error. In the meantime, my goto remedy for when I need to fix AS is to wipe and reinstall it.

Collaborator

dosiecki commented Mar 10, 2017

Your AS install is definitely doing something odd. This first line says it is using Java 8:

Using javac 1.8.0_121 to compile java sources

But then the last line says you are using Java 6:

java: try-with-resources is not supported in -source 1.6

I will update our build config shortly to be a bit more strict about requiring a specific java version, which might get AS to spit out a more sensible error. In the meantime, my goto remedy for when I need to fix AS is to wipe and reinstall it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment