Closed journeym closed 4 years ago
I'm sorry. but there is no option to disable popups, the only thing you can do right now is probably not to queue too many uploads at once to reduce the number of popups.
It is a good idea to abort all uploads if the program notices the limit has been reach and only display one warning instead of one per video.
I do not think I ever seen how that error looks like, if you please can share the full error here I should be able to add code to handle it and get rid of the extra popups.
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden { "code" : 403, "errors" : [ { "domain" : "usageLimits", "message" : "Daily Limit Exceeded. The quota will be reset at midnight Pacific Time (PT). You may monitor your quota usage and adjust limits in the API Console: https://console.developers.google.com/apis/api/youtube.googleapis.com/quotas?project=357246313308", "reason" : "dailyLimitExceeded", "extendedHelp" : "https://console.developers.google.com/apis/api/youtube.googleapis.com/quotas?project=357246313308" } ], "message" : "Daily Limit Exceeded. The quota will be reset at midnight Pacific Time (PT). You may monitor your quota usage and adjust limits in the API Console: https://console.developers.google.com/apis/api/youtube.googleapis.com/quotas?project=357246313308" } at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:150) at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113) at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:554) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:474) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:591) at io.github.stekeblad.videouploader.youtube.Uploader.upload(Uploader.java:258) at io.github.stekeblad.videouploader.youtube.Uploader.access$000(Uploader.java:39) at io.github.stekeblad.videouploader.youtube.Uploader$1.call(Uploader.java:132) at io.github.stekeblad.videouploader.youtube.Uploader$1.call(Uploader.java:126) at javafx.concurrent.Task$TaskCallable.call(Task.java:1423) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) `
Yeah i know there is no such option. Im just unfamiliar with java, and were unable to find where is the popup called.
There are several steps to get from the stacktrace to where the popup is created, following them you end up at the bottom of the mainWindowController. Are you familiar with other programming languages and curious on how it got there?
Thanks! Now im unable to build the app under windows / latest jdk when i run gradlew build, it asks for mainClassName `FAILURE: Build failed with an exception.
No value has been specified for property 'mainClassName'.`
if i supply some random mainClassName, then it builds, but after that, when i run gradlew run, it says Error: Could not find or load main class SomeClassName
By "latest jdk", do you mean the latest version of JDK 8? Other versions of Java is currently not supported.
The name of the main class is "Main" and located in src/main/java/io/github/stekeblad/videouploader/main/Main.java
I am sorry but I do not know much about gradle and can not give more detailed help on your error, I only use gradle for dependencies.
Using that class name gets the same result. Then how do you compile this code? Are you using some IDE? Thats the first java code im trying to compile, so i presume im just doing something wrong.
I am using IntelliJ (the Community edition is free)
All right, ill try it out, thanks.
All right, just cloning your project, building it in idea and then selecting build artifacts (everything goes smoothly w/o error) gives me a jar file in out\artifacts\videouploader_main_jar directory, but with significantly lesser size than yours (mine about 169kb). And it doesn't run. seems i dont have the required java dev. experience for quickly fixing that problem.
Its easier to run the code from inside IntelliJ, I had to spend hours on my build script to create the fix for version 1.3.1.
Go to Run --> Edit configurations and create an "Application" configuration and create a configuration like the one in the image.
I think that is enough. If you have all the gradle files and the code compiles you should be able to select the configuration in the top right and click on run. With a run configuration you will also be able to run the code in debug mode and set breakpoints.
Please note that you will not be able to do anything that involves YouTube when working with the code, it will always fail in or around Auth.authUser();
because it requires a secret key that is not included in git. You need to work around it, for the failure popup you could use the debug code already added in the top of the Uploader.upload() method in some way.
Now im able to run, and just comment out the popup, great. But true, upload isnt working, as well as $(rawname) resolution in preset Upload faiure doesnt mention authuser Stacktrace looks like this
java.lang.NullPointerException at io.github.stekeblad.videouploader.youtube.Uploader$1.call(Uploader.java:135) at io.github.stekeblad.videouploader.youtube.Uploader$1.call(Uploader.java:126) at javafx.concurrent.Task$TaskCallable.call(Task.java:1423) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) `
Looking at your stacktrace and assuming the first lines looks the same for as in the latest commit:
Uploader.java:135 looks like this:
if (! e.getMessage().equals("INTERRUPTED"))
and is inside the catch block of a try-catch. I think its highly unlikely e is null so that would mean that e.getMessage() returns null.
Did you add a line like
throw new Exception();
in the upload method? I just tried and got the same type of error if I throw an exception without a message, throw the exception like this instead:
throw new Exception("My helpful exception message");
I haven't added or modified anything, i just created run config according to your instruction, and ran the application. I have copied VideoUploader folder to compiled application folder, form the original jar application location (to get my preset). Then, i noticed, that $(rawname) is not resolving, and trying to upload results in the above error. I also tried to create new preset with static track name, to make sure that $(rawname) resolution doesn't impact upload, and got the same result.
Can you please compile a new version for me with commented out AlertUtils.exceptionDialog (879 in mainWindowController.java)?
Hi journeym and sorry for the waiting.
I have just uploaded version 1.3.2 that should only show one exception dialog if the quota limit is reached. I have however not been able to test it on the real exception, only by trying to fake it.
Actually, this even got worse. Now it shows 2 errors for every failed upload ;)
Can you please write a bit about how to compile that under any distro. Release version, pref.
The left error for the quota is easily fixed, but I can not see the entire error message for the right error. If you see it again, please update with the entire error message.
I am happy to accept pull requests and include them in future releases, but I can not help you with creating a release on your computer as the process includes secrets between me and YouTube that make YouTube recognise the program as Stekeblads Video Uploader and not any other program that connects to the API.
Im uploading large amount of files, and all that hit the quota get popup with upload failed exception. How to disable that with not much effort involved?