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

Unable to create workout #56

Open
stevenbitner opened this issue Dec 1, 2019 · 17 comments
Open

Unable to create workout #56

stevenbitner opened this issue Dec 1, 2019 · 17 comments

Comments

@stevenbitner
Copy link

I tried running the source via sbt and also the released executable and the connectiin seems to be working although actual workout creation seems to fail. I've tried with "import" and "schedule" commands and get the same error:

Successfully logged in to Garmin Connect!

Creating workouts:
Exception in thread "main" java.util.concurrent.ExecutionException: Boxed Error
	at scala.concurrent.impl.Promise$.resolver(Promise.scala:87)
	at scala.concurrent.impl.Promise$.scala$concurrent$impl$Promise$$resolveTry(Promise.scala:79)
	at scala.concurrent.impl.Promise$KeptPromise$.apply(Promise.scala:406)
	at scala.concurrent.Promise$.fromTry(Promise.scala:142)
	at scala.concurrent.Promise$.failed(Promise.scala:128)
	at scala.concurrent.Future$.failed(Future.scala:623)
	at com.github.mgifos.workouts.GarminConnect.$anonfun$createWorkouts$3(GarminConnect.scala:67)
	at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:307)
	at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41)
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
	at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)
	at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:91)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
	at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:85)
	at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:91)
	at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40)
	at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:44)
	at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
	at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
	at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
	at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.Error: Cannot create workout
	... 15 more
@GrygoriyChk
Copy link

Hi,
can you help for dummies, what you did to progress to this step? Just unpack and run .bat file?
I am trying to do so but cmd doesn't recognize bat.
thanks!

@stevenbitner
Copy link
Author

For running from the release, I followed this https://github.com/mgifos/quick-plan#installation and used the command line options examples that follow that. I'm on a Mac, on Windows it would be the .bat executable.

@Raistlfiren
Copy link

@stevenbitner - I think this is a problem with logging in and authenticating the requests. I ran into this as well, but I haven't found a solid workaround for it. It is like the SESSIONID isn't being relayed with the cookies after logging in properly.

@stevenbitner
Copy link
Author

@Raistlfiren - you say you haven't found a solid workaround for it. Any chance you're willing to share a flimsy kludge workaround 😄 ?

@GrygoriyChk
Copy link

For running from the release, I followed this https://github.com/mgifos/quick-plan#installation and used the command line options examples that follow that. I'm on a Mac, on Windows it would be the .bat executable.

I am on Windows. I do follow instructions, Java 8 seems to be in place, copy, unzip and run bat and than command line. In Command line it doesn't recognize "quick-plan" as bat. Tried to fix path, did the same on a few machines and still nothing.

@mgifos
Copy link
Owner

mgifos commented Dec 6, 2019

I can confirm the similar behavior on Linux, I got this:

Successfully logged in to Garmin Connect! [error] (run-main-0) java.util.concurrent.ExecutionException: Boxed Error [error] java.util.concurrent.ExecutionException: Boxed Error [error] at scala.concurrent.impl.Promise$.resolver(Promise.scala:87) [error] at scala.concurrent.impl.Promise$.scala$concurrent$impl$Promise$$resolveTry(Promise.scala:79) [error] at scala.concurrent.impl.Promise$KeptPromise$.apply(Promise.scala:406) [error] at scala.concurrent.Promise$.fromTry(Promise.scala:142) [error] at scala.concurrent.Promise$.failed(Promise.scala:128) [error] at scala.concurrent.Future$.failed(Future.scala:623) [error] at com.github.mgifos.workouts.GarminConnect.$anonfun$getWorkoutsMap$1(GarminConnect.scala:158) [error] at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:307) [error] at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41) [error] at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64) [error] at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55) [error] at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:91) [error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23) [error] at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:85) [error] at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:91) [error] at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40) [error] at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:44) [error] at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [error] at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [error] at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [error] at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [error] Caused by: java.lang.Error: Cannot retrieve workout list from Garmin Connect [error] at com.github.mgifos.workouts.GarminConnect.$anonfun$getWorkoutsMap$1(GarminConnect.scala:158) [error] at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:307) [error] at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41) [error] at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64) [error] at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55) [error] at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:91) [error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23) [error] at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:85) [error] at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:91) [error] at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40) [error] at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:44) [error] at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [error] at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [error] at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [error] at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [error] Nonzero exit code: 1 [error] (Compile / run) Nonzero exit code: 1

It seems we need a new release of the software. My guess would be that Garmin has changed something in their API.

@Raistlfiren
Copy link

@mgifos and @stevenbitner - I noticed that this Python project works okay - https://github.com/petergardfjall/garminexport authenticating to Garmin Connect. It is in essence getting the body of the login request, grabbing the response_url from the HTML body, and fetching the session from that URLs response. I was trying to replicate the functionality, but my Scala is limited. I started work on it, but I am unsure how to do a synchronous request in Scala to get the ticket URL since I keep on getting Future[String] or something like that.

Here is the method that extracts the url - https://github.com/petergardfjall/garminexport/blob/master/garminexport/garminclient.py#L137
This is the authenticate method - https://github.com/petergardfjall/garminexport/blob/master/garminexport/garminclient.py#L103

@JCPvanHooren
Copy link

Seems a new release is needed indeed; getting the same behavior.
Happy to help testing, but I have no knowledge of Scala.

@Brilgwae
Copy link

Hi @mgifos,

Any luck for a release ?

Here's what I got today

Successfully logged in to Garmin Connect! Exception in thread "main" java.util.concurrent.ExecutionException: Boxed Error at scala.concurrent.impl.Promise$.resolver(Promise.scala:87) at scala.concurrent.impl.Promise$.scala$concurrent$impl$Promise$$resolveTry(Promise.scala:79) at scala.concurrent.impl.Promise$KeptPromise$.apply(Promise.scala:406) at scala.concurrent.Promise$.fromTry(Promise.scala:142) at scala.concurrent.Promise$.failed(Promise.scala:128) at scala.concurrent.Future$.failed(Future.scala:623) at com.github.mgifos.workouts.GarminConnect.$anonfun$getWorkoutsMap$1(GarminConnect.scala:158) at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:307) at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41) at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64) at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55) at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:91) at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23) at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:85) at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:91) at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:44) at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) Caused by: java.lang.Error: Cannot retrieve workout list from Garmin Connect ... 15 more

@andygoundry
Copy link

Yeah, me too... I also see the same errors "Cannot retrieve workout list from Garmin Connect" and "Cannot create workout"

@andygoundry
Copy link

Is this project still being maintained?

@mgifos
Copy link
Owner

mgifos commented Apr 14, 2020

It is, but it seems there's no one else but me to fix this and I'm over busy these days :(

@8cH9azbsFifZ
Copy link

Same for me. A fix release would be great.

@pygoubet
Copy link

pygoubet commented Aug 9, 2020

This project looks great, can we expect a fix to:
Successfully logged in to Garmin Connect!

Creating workouts:
Exception in thread "main" java.util.concurrent.ExecutionException: Boxed Error
at scala.concurrent.impl.Promise$.resolver(Promise.scala:87)
at scala.concurrent.impl.Promise$.scala$concurrent$impl$Promise$$resolveTry(Promise.scala:79)
at scala.concurrent.impl.Promise$KeptPromise$.apply(Promise.scala:406)
at scala.concurrent.Promise$.fromTry(Promise.scala:142)
at scala.concurrent.Promise$.failed(Promise.scala:128)
at scala.concurrent.Future$.failed(Future.scala:623)
at com.github.mgifos.workouts.GarminConnect.$anonfun$createWorkouts$3(GarminConnect.scala:67)
at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:307)
at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41)
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)
at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:91)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:85)
at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:91)
at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:44)
at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.Error: Cannot create workout
... 15 more

@Brilgwae
Copy link

Hi @mgifos,
I guess this project is dead, right ?

@pygoubet
Copy link

pygoubet commented Dec 7, 2020

Hi @mgifos,
I guess this project is dead, right ?

It seems so...
Have a look to https://github.com/Raistlfiren/garmin-csv-plan
I have just tested it. It works great!

@Raistlfiren
Copy link

CAUTION Be careful on using what I created. I made it for myself and my plans are purely just for running. If I could have figured out the login issue in Scala, then I would have wrote it for this project. YMMV.

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

9 participants