wwadge / awair-bridge

Spring boot app to fetch data from Awair element
13 stars 3 forks source link

getting an 401 error from PW #6

Closed aseelert closed 2 years ago

aseelert commented 2 years ago
2022-04-05 12:14:26.273  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : Starting data fetch...
2022-04-05 12:14:26.700  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : AwairDataPacket(otherFields={data=[{timestamp=2022-04-05T12:14:25.000Z, score=89.0, sensors=[{comp=temp, value=23.440000534057617}, {comp=humid, value=27.190000534057617}, {comp=pm25, value=1.0}, {comp=co2, value=467.0}, {comp=voc, value=246.0}], indices=[{comp=pm25, value=0.0}, {comp=co2, value=0.0}, {comp=temp, value=0.0}, {comp=voc, value=0.0}, {comp=humid, value=-2.0}]}]})
2022-04-05 12:14:31.893  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T12:14:31.893786099Z[Etc/UTC]: Retry 'pw-send-data' recorded an error which has been ignored: 'feign.FeignException$Unauthorized: [401 Unauthorized] during [POST] to [https://wearableapi.planetwatch.io/api/data/devicedata] [PWClient#sendData(PWData)]: []'.
2022-04-05 12:14:31.896 ERROR 1 --- [   scheduling-1] o.s.s.s.TaskUtils$LoggingErrorHandler    : Unexpected error occurred in scheduled task

feign.FeignException$Unauthorized: [401 Unauthorized] during [POST] to [https://wearableapi.planetwatch.io/api/data/devicedata] [PWClient#sendData(PWData)]: []
    at feign.FeignException.clientErrorStatus(FeignException.java:215) ~[feign-core-11.8.jar:na]
    at feign.FeignException.errorStatus(FeignException.java:194) ~[feign-core-11.8.jar:na]
    at feign.FeignException.errorStatus(FeignException.java:185) ~[feign-core-11.8.jar:na]
    at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:92) ~[feign-core-11.8.jar:na]
    at feign.AsyncResponseHandler.handleResponse(AsyncResponseHandler.java:96) ~[feign-core-11.8.jar:na]
    at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138) ~[feign-core-11.8.jar:na]
    at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89) ~[feign-core-11.8.jar:na]
    at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100) ~[feign-core-11.8.jar:na]
    at jdk.proxy2/jdk.proxy2.$Proxy70.sendData(Unknown Source) ~[na:na]
    at jdk.internal.reflect.GeneratedMethodAccessor34.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89) ~[spring-aop-5.3.18.jar:5.3.18]
    at io.github.resilience4j.retry.Retry.lambda$decorateCheckedSupplier$3f69f149$1(Retry.java:137) ~[resilience4j-retry-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.Retry.executeCheckedSupplier(Retry.java:419) ~[resilience4j-retry-1.7.0.jar:1.7.0]
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) ~[spring-aop-5.3.18.jar:5.3.18]
    at com.pw.awairbridge.service.impl.DataBridgeImpl.runService(DataBridgeImpl.java:113) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84) ~[spring-context-5.3.18.jar:5.3.18]
    at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[na:na]
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
2022-04-05 12:26:41.739  INFO 1 --- [   scheduling-1] com.pw.awairbridge.util.PWAuthService    : Logging in PW
2022-04-05 12:26:41.872  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T12:26:41.872590591Z[Etc/UTC]: Retry 'pw-auth', waiting PT1M until attempt '1'. Last attempt failed with exception 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 12:27:42.031  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T12:27:42.031573407Z[Etc/UTC]: Retry 'pw-auth', waiting PT1M until attempt '2'. Last attempt failed with exception 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 12:28:42.120  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T12:28:42.120573644Z[Etc/UTC]: Retry 'pw-auth', waiting PT1M until attempt '3'. Last attempt failed with exception 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 12:29:42.207  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T12:29:42.207652564Z[Etc/UTC]: Retry 'pw-auth' recorded a failed retry attempt. Number of retry attempts: '4'. Giving up. Last exception was: 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 12:29:42.209 ERROR 1 --- [   scheduling-1] o.s.s.s.TaskUtils$LoggingErrorHandler    : Unexpected error occurred in scheduled task

2022-04-05 12:29:42.210  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : Starting data fetch...
2022-04-05 12:29:42.634  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : AwairDataPacket(otherFields={data=[{timestamp=2022-04-05T12:29:29.000Z, score=89.0, sensors=[{comp=voc, value=236.0}, {comp=temp, value=23.40999984741211}, {comp=co2, value=471.0}, {comp=humid, value=27.190000534057617}, {comp=pm25, value=1.0}], indices=[{comp=temp, value=0.0}, {comp=co2, value=0.0}, {comp=voc, value=0.0}, {comp=humid, value=-2.0}, {comp=pm25, value=0.0}]}]})
2022-04-05 12:29:42.834  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T12:29:42.834705129Z[Etc/UTC]: Retry 'pw-send-data' recorded an error which has been ignored: 'feign.FeignException$Unauthorized: [401 Unauthorized] during [POST] to [https://wearableapi.planetwatch.io/api/data/devicedata] [PWClient#sendData(PWData)]: []'.
2022-04-05 12:29:42.836 ERROR 1 --- [   scheduling-1] o.s.s.s.TaskUtils$LoggingErrorHandler    : Unexpected error occurred in scheduled task

    at feign.FeignException.clientErrorStatus(FeignException.java:215) ~[feign-core-11.8.jar:na]
    at feign.FeignException.errorStatus(FeignException.java:194) ~[feign-core-11.8.jar:na]
aseelert commented 2 years ago

after restart:


  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.6.6)

2022-04-05 12:33:51.849  INFO 1 --- [           main] c.pw.awairbridge.AwairBridgeApplication  : Starting AwairBridgeApplication using Java 17.0.2 on 8310cfa25ebe with PID 1 (/app/classes started by root in /)
2022-04-05 12:33:51.853  INFO 1 --- [           main] c.pw.awairbridge.AwairBridgeApplication  : No active profile set, falling back to 1 default profile: "default"
2022-04-05 12:33:55.213  INFO 1 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=8255abb7-84a9-3679-86e8-c95aa8bcbf85
2022-04-05 12:33:57.941  INFO 1 --- [           main] com.pw.awairbridge.util.PWAuthService    : Logging in PW
2022-04-05 12:34:00.588  INFO 1 --- [           main] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T12:34:00.587674954Z[Etc/UTC]: Retry 'pw-auth', waiting PT1M until attempt '1'. Last attempt failed with exception 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 12:35:00.713  INFO 1 --- [           main] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T12:35:00.713248743Z[Etc/UTC]: Retry 'pw-auth', waiting PT1M until attempt '2'. Last attempt failed with exception 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 12:36:00.890  INFO 1 --- [           main] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T12:36:00.890707017Z[Etc/UTC]: Retry 'pw-auth', waiting PT1M until attempt '3'. Last attempt failed with exception 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
aseelert commented 2 years ago
2022-04-05 12:37:01.041  INFO 1 --- [           main] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T12:37:01.041629139Z[Etc/UTC]: Retry 'pw-auth' recorded a failed retry attempt. Number of retry attempts: '4'. Giving up. Last exception was: 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 12:37:01.046  WARN 1 --- [           main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataBridgeImpl' defined in file [/app/classes/com/pw/awairbridge/service/impl/DataBridgeImpl.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.pw.awairbridge.service.impl.DataBridgeImpl]: Constructor threw exception; nested exception is feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]
2022-04-05 12:37:01.073  INFO 1 --- [           main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-04-05 12:37:01.410 ERROR 1 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataBridgeImpl' defined in file [/app/classes/com/pw/awairbridge/service/impl/DataBridgeImpl.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.pw.awairbridge.service.impl.DataBridgeImpl]: Constructor threw exception; nested exception is feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:315) ~[spring-beans-5.3.18.jar:5.3.18]
    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:296) ~[spring-beans-5.3.18.jar:5.3.18]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222) ~[spring-beans-5.3.18.jar:5.3.18]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.18.jar:5.3.18]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.18.jar:5.3.18]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.18.jar:5.3.18]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.18.jar:5.3.18]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.18.jar:5.3.18]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.18.jar:5.3.18]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953) ~[spring-beans-5.3.18.jar:5.3.18]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.18.jar:5.3.18]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.18.jar:5.3.18]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740) ~[spring-boot-2.6.6.jar:2.6.6]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:415) ~[spring-boot-2.6.6.jar:2.6.6]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) ~[spring-boot-2.6.6.jar:2.6.6]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) ~[spring-boot-2.6.6.jar:2.6.6]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) ~[spring-boot-2.6.6.jar:2.6.6]
    at com.pw.awairbridge.AwairBridgeApplication.main(AwairBridgeApplication.java:68) ~[classes/:na]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.pw.awairbridge.service.impl.DataBridgeImpl]: Constructor threw exception; nested exception is feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:224) ~[spring-beans-5.3.18.jar:5.3.18]
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:117) ~[spring-beans-5.3.18.jar:5.3.18]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:311) ~[spring-beans-5.3.18.jar:5.3.18]
    ... 18 common frames omitted
softlion commented 2 years ago

This is because you are running the app on a datacenter computer, and cloudflare is blocking the app.

why is the community app from sheherazade not blocked and this tool is ? I don't know.

aseelert commented 2 years ago

Hej Benjamin,

Nope it’s running on a synology in my local network. Seems like 403 comes from PW?! At least it looks like this.

Mit freundlichen Grüßen Alexander Seelert

Am 05.04.2022 um 14:39 schrieb Benjamin Mayrargue @.***>:

 This is because you are running the app on a datacenter computer, and cloudflare is blocking the app.

why is the community app from sheherazade not blocked and this tool is ? I don't know.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

wwadge commented 2 years ago

Cloud + non browser = assumed by CF to be a bot and thus blocked (possibly via TLS fingerprinting).

wwadge commented 2 years ago

It's dynamically changing all the time, here's a log where it failed a few times then it succeeds (obviously no code changes in between)

2022-04-05 12:39:01.103  INFO 1 --- [           main] com.pw.awairbridge.util.PWAuthService    : Logging in PW
2022-04-05 12:39:02.628  INFO 1 --- [           main] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T12:39:02.626369654Z[Etc/UTC]: Retry 'pw-auth', waiting PT1M until attempt '1'. Last attempt failed with exception 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 12:40:02.906  INFO 1 --- [           main] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T12:40:02.905818922Z[Etc/UTC]: Retry 'pw-auth', waiting PT1M until attempt '2'. Last attempt failed with exception 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 12:41:03.150  INFO 1 --- [           main] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T12:41:03.149663456Z[Etc/UTC]: Retry 'pw-auth', waiting PT1M until attempt '3'. Last attempt failed with exception 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 12:42:04.264  INFO 1 --- [           main] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T12:42:04.264065786Z[Etc/UTC]: Retry 'pw-auth' recorded a successful retry attempt. Number of retry attempts: '3', Last exception was: 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 12:42:05.056  INFO 1 --- [           main] com.pw.awairbridge.util.PWAuthService    : Login to PW: OK
wwadge commented 2 years ago

Once it succeeds once, it will keep on working for 30min (or until token expires) even if subsequent attempts at logging in fail. So best we can do is let it go for a bit till it eventually connects (or use a vpn). In the source code there's a pwLogin.sh script if you want to test with that, it gets the same failure via curl

aseelert commented 2 years ago

okay means, just wait until it goes trough. Assume >30min? before you re-login, right?

wwadge commented 2 years ago

I try to login every 20min, but if the process fails it's still holding on to the old token so it would work till it expires. It's pretty much out of my control I'm afraid, cloudflare's anti-bot is designed to prevent exactly what we're trying to do here so it's a cat and mouse game. It could of course be disabled by PW via a config toggle..

wwadge commented 2 years ago

https://github.com/klzgrad/naiveproxy <-- probably this can work permanently

tiagodenoronha commented 2 years ago

Tried running docker locally on my pc and got the same error, but was a 403 on my case. Stops on the fourth attempt on my case.

aseelert commented 2 years ago

Hm again it looks like its sending Zero NULL data to PW. Means, I still have the one Awair which is not working, maybe this cause the trouble?

I attach the entire log

2022-04-05 13:45:44.663  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : Starting data fetch...
2022-04-05 13:45:45.072  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : AwairDataPacket(otherFields={data=[{timestamp=2022-04-05T13:45:39.000Z, score=88.0, sensors=[{comp=humid, value=26.979999542236328}, {comp=co2, value=449.0}, {comp=temp, value=23.6200008392334}, {comp=pm25, value=1.0}, {comp=voc, value=246.0}], indices=[{comp=pm25, value=0.0}, {comp=humid, value=-2.0}, {comp=co2, value=0.0}, {comp=voc, value=0.0}, {comp=temp, value=0.0}]}]})
2022-04-05 13:45:45.584  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : Sending data for device 'Element Ulli' to PW: OK
2022-04-05 13:45:55.956  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : AwairDataPacket(otherFields={data=[{timestamp=2022-04-05T13:45:55.000Z, score=86.0, sensors=[{comp=humid, value=30.670000076293945}, {comp=voc, value=394.0}, {comp=pm25, value=1.0}, {comp=co2, value=576.0}, {comp=temp, value=22.690000534057617}], indices=[{comp=humid, value=-2.0}, {comp=voc, value=1.0}, {comp=co2, value=0.0}, {comp=pm25, value=0.0}, {comp=temp, value=0.0}]}]})
2022-04-05 13:45:56.368  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : Sending data for device 'Element Steffen' to PW: OK
2022-04-05 13:46:06.715  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : AwairDataPacket(otherFields={data=[]})
2022-04-05 13:46:06.716  WARN 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : Did not receive data as expected from Awair, skipping 'Hofsee'
2022-04-05 13:46:07.064  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : AwairDataPacket(otherFields={data=[{timestamp=2022-04-05T13:46:03.000Z, score=87.0, sensors=[{comp=temp, value=18.969999313354492}, {comp=voc, value=2028.0}, {comp=co2, value=705.0}, {comp=pm25, value=2.0}, {comp=humid, value=45.130001068115234}], indices=[{comp=humid, value=0.0}, {comp=temp, value=0.0}, {comp=pm25, value=0.0}, {comp=co2, value=1.0}, {comp=voc, value=2.0}]}]})
2022-04-05 13:46:07.557  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : Sending data for device 'Element Evi' to PW: OK
2022-04-05 13:46:30.945  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : AwairDataPacket(otherFields={data=[{timestamp=2022-04-05T13:46:26.000Z, score=79.0, sensors=[{comp=voc, value=367.0}, {comp=co2, value=769.0}, {comp=humid, value=39.61000061035156}, {comp=temp, value=23.75}, {comp=pm25, value=49.0}], indices=[{comp=pm25, value=2.0}, {comp=temp, value=0.0}, {comp=humid, value=0.0}, {comp=co2, value=1.0}, {comp=voc, value=1.0}]}]})
2022-04-05 13:46:31.949  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : Sending data for device 'Abteiweg Element' to PW: OK
2022-04-05 14:01:42.743  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : Starting data fetch...
2022-04-05 14:01:44.142  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : AwairDataPacket(otherFields={data=[{timestamp=2022-04-05T14:01:33.000Z, score=89.0, sensors=[{comp=humid, value=26.979999542236328}, {comp=co2, value=445.0}, {comp=temp, value=23.6200008392334}, {comp=voc, value=234.0}, {comp=pm25, value=1.0}], indices=[{comp=pm25, value=0.0}, {comp=voc, value=0.0}, {comp=humid, value=-2.0}, {comp=co2, value=0.0}, {comp=temp, value=0.0}]}]})
2022-04-05 14:01:44.745  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T14:01:44.731468681Z[Etc/UTC]: Retry 'pw-send-data' recorded an error which has been ignored: 'feign.FeignException$Unauthorized: [401 Unauthorized] during [POST] to [https://wearableapi.planetwatch.io/api/data/devicedata] [PWClient#sendData(PWData)]: []'.
2022-04-05 14:01:44.766 ERROR 1 --- [   scheduling-1] o.s.s.s.TaskUtils$LoggingErrorHandler    : Unexpected error occurred in scheduled task

feign.FeignException$Unauthorized: [401 Unauthorized] during [POST] to [https://wearableapi.planetwatch.io/api/data/devicedata] [PWClient#sendData(PWData)]: []
    at feign.FeignException.clientErrorStatus(FeignException.java:215) ~[feign-core-11.8.jar:na]
    at feign.FeignException.errorStatus(FeignException.java:194) ~[feign-core-11.8.jar:na]
    at feign.FeignException.errorStatus(FeignException.java:185) ~[feign-core-11.8.jar:na]
    at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:92) ~[feign-core-11.8.jar:na]
    at feign.AsyncResponseHandler.handleResponse(AsyncResponseHandler.java:96) ~[feign-core-11.8.jar:na]
    at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138) ~[feign-core-11.8.jar:na]
    at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89) ~[feign-core-11.8.jar:na]
    at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100) ~[feign-core-11.8.jar:na]
    at jdk.proxy2/jdk.proxy2.$Proxy70.sendData(Unknown Source) ~[na:na]
    at jdk.internal.reflect.GeneratedMethodAccessor34.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89) ~[spring-aop-5.3.18.jar:5.3.18]
    at io.github.resilience4j.retry.Retry.lambda$decorateCheckedSupplier$3f69f149$1(Retry.java:137) ~[resilience4j-retry-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.Retry.executeCheckedSupplier(Retry.java:419) ~[resilience4j-retry-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.handleDefaultJoinPoint(RetryAspect.java:184) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.proceed(RetryAspect.java:141) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.retryAroundAdvice(RetryAspect.java:120) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at jdk.internal.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) ~[spring-aop-5.3.18.jar:5.3.18]
    at jdk.proxy2/jdk.proxy2.$Proxy71.sendData(Unknown Source) ~[na:na]
    at com.pw.awairbridge.service.impl.DataBridgeImpl.runService(DataBridgeImpl.java:113) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84) ~[spring-context-5.3.18.jar:5.3.18]
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-5.3.18.jar:5.3.18]
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[na:na]
    at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[na:na]
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
    at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

2022-04-05 14:05:45.537  INFO 1 --- [   scheduling-1] com.pw.awairbridge.util.PWAuthService    : Logging in PW
2022-04-05 14:05:46.933  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T14:05:46.932903051Z[Etc/UTC]: Retry 'pw-auth', waiting PT1M until attempt '1'. Last attempt failed with exception 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 14:06:47.781  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T14:06:47.781093616Z[Etc/UTC]: Retry 'pw-auth', waiting PT1M until attempt '2'. Last attempt failed with exception 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 14:07:48.370  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T14:07:48.370546905Z[Etc/UTC]: Retry 'pw-auth', waiting PT1M until attempt '3'. Last attempt failed with exception 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 14:08:48.590  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T14:08:48.590448472Z[Etc/UTC]: Retry 'pw-auth' recorded a failed retry attempt. Number of retry attempts: '4'. Giving up. Last exception was: 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 14:08:49.062 ERROR 1 --- [   scheduling-1] o.s.s.s.TaskUtils$LoggingErrorHandler    : Unexpected error occurred in scheduled task

feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]
    at feign.FeignException.clientErrorStatus(FeignException.java:217) ~[feign-core-11.8.jar:na]
    at feign.FeignException.errorStatus(FeignException.java:194) ~[feign-core-11.8.jar:na]
    at feign.FeignException.errorStatus(FeignException.java:185) ~[feign-core-11.8.jar:na]
    at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:92) ~[feign-core-11.8.jar:na]
    at feign.AsyncResponseHandler.handleResponse(AsyncResponseHandler.java:96) ~[feign-core-11.8.jar:na]
    at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138) ~[feign-core-11.8.jar:na]
    at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89) ~[feign-core-11.8.jar:na]
    at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100) ~[feign-core-11.8.jar:na]
    at jdk.proxy2/jdk.proxy2.$Proxy73.openIDAuth(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89) ~[spring-aop-5.3.18.jar:5.3.18]
    at io.github.resilience4j.retry.Retry.lambda$decorateCheckedSupplier$3f69f149$1(Retry.java:137) ~[resilience4j-retry-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.Retry.executeCheckedSupplier(Retry.java:419) ~[resilience4j-retry-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.handleDefaultJoinPoint(RetryAspect.java:184) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.proceed(RetryAspect.java:141) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.retryAroundAdvice(RetryAspect.java:120) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at jdk.internal.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) ~[spring-aop-5.3.18.jar:5.3.18]
    at jdk.proxy2/jdk.proxy2.$Proxy74.openIDAuth(Unknown Source) ~[na:na]
    at com.pw.awairbridge.util.PWAuthService.doLogin(PWAuthService.java:44) ~[classes/:na]
    at com.pw.awairbridge.service.impl.DataBridgeImpl.doLogin(DataBridgeImpl.java:57) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84) ~[spring-context-5.3.18.jar:5.3.18]
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-5.3.18.jar:5.3.18]
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[na:na]
    at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[na:na]
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
    at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

2022-04-05 14:16:47.410  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : Starting data fetch...
2022-04-05 14:16:49.441  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : AwairDataPacket(otherFields={data=[{timestamp=2022-04-05T14:16:37.000Z, score=89.0, sensors=[{comp=co2, value=446.0}, {comp=pm25, value=1.0}, {comp=temp, value=23.579999923706055}, {comp=voc, value=233.0}, {comp=humid, value=27.010000228881836}], indices=[{comp=pm25, value=0.0}, {comp=co2, value=0.0}, {comp=temp, value=0.0}, {comp=voc, value=0.0}, {comp=humid, value=-2.0}]}]})
2022-04-05 14:16:49.645  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T14:16:49.644878727Z[Etc/UTC]: Retry 'pw-send-data' recorded an error which has been ignored: 'feign.FeignException$Unauthorized: [401 Unauthorized] during [POST] to [https://wearableapi.planetwatch.io/api/data/devicedata] [PWClient#sendData(PWData)]: []'.
2022-04-05 14:16:49.739 ERROR 1 --- [   scheduling-1] o.s.s.s.TaskUtils$LoggingErrorHandler    : Unexpected error occurred in scheduled task

feign.FeignException$Unauthorized: [401 Unauthorized] during [POST] to [https://wearableapi.planetwatch.io/api/data/devicedata] [PWClient#sendData(PWData)]: []
    at feign.FeignException.clientErrorStatus(FeignException.java:215) ~[feign-core-11.8.jar:na]
    at feign.FeignException.errorStatus(FeignException.java:194) ~[feign-core-11.8.jar:na]
    at feign.FeignException.errorStatus(FeignException.java:185) ~[feign-core-11.8.jar:na]
    at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:92) ~[feign-core-11.8.jar:na]
    at feign.AsyncResponseHandler.handleResponse(AsyncResponseHandler.java:96) ~[feign-core-11.8.jar:na]
    at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138) ~[feign-core-11.8.jar:na]
    at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89) ~[feign-core-11.8.jar:na]
    at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100) ~[feign-core-11.8.jar:na]
    at jdk.proxy2/jdk.proxy2.$Proxy70.sendData(Unknown Source) ~[na:na]
    at jdk.internal.reflect.GeneratedMethodAccessor34.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89) ~[spring-aop-5.3.18.jar:5.3.18]
    at io.github.resilience4j.retry.Retry.lambda$decorateCheckedSupplier$3f69f149$1(Retry.java:137) ~[resilience4j-retry-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.Retry.executeCheckedSupplier(Retry.java:419) ~[resilience4j-retry-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.handleDefaultJoinPoint(RetryAspect.java:184) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.proceed(RetryAspect.java:141) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.retryAroundAdvice(RetryAspect.java:120) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at jdk.internal.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) ~[spring-aop-5.3.18.jar:5.3.18]
    at jdk.proxy2/jdk.proxy2.$Proxy71.sendData(Unknown Source) ~[na:na]
    at com.pw.awairbridge.service.impl.DataBridgeImpl.runService(DataBridgeImpl.java:113) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84) ~[spring-context-5.3.18.jar:5.3.18]
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-5.3.18.jar:5.3.18]
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[na:na]
    at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[na:na]
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
    at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

2022-04-05 14:28:49.573  INFO 1 --- [   scheduling-1] com.pw.awairbridge.util.PWAuthService    : Logging in PW
2022-04-05 14:28:50.995  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T14:28:50.993467685Z[Etc/UTC]: Retry 'pw-auth', waiting PT1M until attempt '1'. Last attempt failed with exception 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 14:29:52.050  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T14:29:52.050670958Z[Etc/UTC]: Retry 'pw-auth', waiting PT1M until attempt '2'. Last attempt failed with exception 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 14:30:53.770  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T14:30:53.770023784Z[Etc/UTC]: Retry 'pw-auth', waiting PT1M until attempt '3'. Last attempt failed with exception 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 14:31:54.172  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T14:31:54.172644505Z[Etc/UTC]: Retry 'pw-auth' recorded a failed retry attempt. Number of retry attempts: '4'. Giving up. Last exception was: 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 14:31:54.375 ERROR 1 --- [   scheduling-1] o.s.s.s.TaskUtils$LoggingErrorHandler    : Unexpected error occurred in scheduled task

feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]
    at feign.FeignException.clientErrorStatus(FeignException.java:217) ~[feign-core-11.8.jar:na]
    at feign.FeignException.errorStatus(FeignException.java:194) ~[feign-core-11.8.jar:na]
    at feign.FeignException.errorStatus(FeignException.java:185) ~[feign-core-11.8.jar:na]
    at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:92) ~[feign-core-11.8.jar:na]
    at feign.AsyncResponseHandler.handleResponse(AsyncResponseHandler.java:96) ~[feign-core-11.8.jar:na]
    at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138) ~[feign-core-11.8.jar:na]
    at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89) ~[feign-core-11.8.jar:na]
    at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100) ~[feign-core-11.8.jar:na]
    at jdk.proxy2/jdk.proxy2.$Proxy73.openIDAuth(Unknown Source) ~[na:na]
    at jdk.internal.reflect.GeneratedMethodAccessor38.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89) ~[spring-aop-5.3.18.jar:5.3.18]
    at io.github.resilience4j.retry.Retry.lambda$decorateCheckedSupplier$3f69f149$1(Retry.java:137) ~[resilience4j-retry-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.Retry.executeCheckedSupplier(Retry.java:419) ~[resilience4j-retry-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.handleDefaultJoinPoint(RetryAspect.java:184) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.proceed(RetryAspect.java:141) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.retryAroundAdvice(RetryAspect.java:120) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at jdk.internal.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) ~[spring-aop-5.3.18.jar:5.3.18]
    at jdk.proxy2/jdk.proxy2.$Proxy74.openIDAuth(Unknown Source) ~[na:na]
    at com.pw.awairbridge.util.PWAuthService.doLogin(PWAuthService.java:44) ~[classes/:na]
    at com.pw.awairbridge.service.impl.DataBridgeImpl.doLogin(DataBridgeImpl.java:57) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84) ~[spring-context-5.3.18.jar:5.3.18]
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-5.3.18.jar:5.3.18]
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[na:na]
    at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[na:na]
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
    at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

2022-04-05 14:31:54.376  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : Starting data fetch...
2022-04-05 14:31:54.926  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : AwairDataPacket(otherFields={data=[{timestamp=2022-04-05T14:31:50.000Z, score=89.0, sensors=[{comp=temp, value=23.559999465942383}, {comp=co2, value=445.0}, {comp=pm25, value=1.0}, {comp=voc, value=235.0}, {comp=humid, value=27.040000915527344}], indices=[{comp=humid, value=-2.0}, {comp=temp, value=0.0}, {comp=voc, value=0.0}, {comp=co2, value=0.0}, {comp=pm25, value=0.0}]}]})
2022-04-05 14:31:55.136  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T14:31:55.136833025Z[Etc/UTC]: Retry 'pw-send-data' recorded an error which has been ignored: 'feign.FeignException$Unauthorized: [401 Unauthorized] during [POST] to [https://wearableapi.planetwatch.io/api/data/devicedata] [PWClient#sendData(PWData)]: []'.
2022-04-05 14:31:55.139 ERROR 1 --- [   scheduling-1] o.s.s.s.TaskUtils$LoggingErrorHandler    : Unexpected error occurred in scheduled task

feign.FeignException$Unauthorized: [401 Unauthorized] during [POST] to [https://wearableapi.planetwatch.io/api/data/devicedata] [PWClient#sendData(PWData)]: []
    at feign.FeignException.clientErrorStatus(FeignException.java:215) ~[feign-core-11.8.jar:na]
    at feign.FeignException.errorStatus(FeignException.java:194) ~[feign-core-11.8.jar:na]
    at feign.FeignException.errorStatus(FeignException.java:185) ~[feign-core-11.8.jar:na]
    at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:92) ~[feign-core-11.8.jar:na]
    at feign.AsyncResponseHandler.handleResponse(AsyncResponseHandler.java:96) ~[feign-core-11.8.jar:na]
    at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138) ~[feign-core-11.8.jar:na]
    at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89) ~[feign-core-11.8.jar:na]
    at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100) ~[feign-core-11.8.jar:na]
    at jdk.proxy2/jdk.proxy2.$Proxy70.sendData(Unknown Source) ~[na:na]
    at jdk.internal.reflect.GeneratedMethodAccessor34.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89) ~[spring-aop-5.3.18.jar:5.3.18]
    at io.github.resilience4j.retry.Retry.lambda$decorateCheckedSupplier$3f69f149$1(Retry.java:137) ~[resilience4j-retry-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.Retry.executeCheckedSupplier(Retry.java:419) ~[resilience4j-retry-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.handleDefaultJoinPoint(RetryAspect.java:184) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.proceed(RetryAspect.java:141) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.retryAroundAdvice(RetryAspect.java:120) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at jdk.internal.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) ~[spring-aop-5.3.18.jar:5.3.18]
    at jdk.proxy2/jdk.proxy2.$Proxy71.sendData(Unknown Source) ~[na:na]
    at com.pw.awairbridge.service.impl.DataBridgeImpl.runService(DataBridgeImpl.java:113) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84) ~[spring-context-5.3.18.jar:5.3.18]
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-5.3.18.jar:5.3.18]
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[na:na]
    at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[na:na]
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
    at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

2022-04-05 14:46:55.913  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : Starting data fetch...
2022-04-05 14:46:57.743  INFO 1 --- [   scheduling-1] c.p.a.service.impl.DataBridgeImpl        : AwairDataPacket(otherFields={data=[{timestamp=2022-04-05T14:46:54.000Z, score=89.0, sensors=[{comp=pm25, value=1.0}, {comp=temp, value=23.549999237060547}, {comp=voc, value=237.0}, {comp=humid, value=27.079999923706055}, {comp=co2, value=442.0}], indices=[{comp=pm25, value=0.0}, {comp=temp, value=0.0}, {comp=co2, value=0.0}, {comp=humid, value=-2.0}, {comp=voc, value=0.0}]}]})
2022-04-05 14:46:57.922  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T14:46:57.922578070Z[Etc/UTC]: Retry 'pw-send-data' recorded an error which has been ignored: 'feign.FeignException$Unauthorized: [401 Unauthorized] during [POST] to [https://wearableapi.planetwatch.io/api/data/devicedata] [PWClient#sendData(PWData)]: []'.
2022-04-05 14:46:58.441 ERROR 1 --- [   scheduling-1] o.s.s.s.TaskUtils$LoggingErrorHandler    : Unexpected error occurred in scheduled task

feign.FeignException$Unauthorized: [401 Unauthorized] during [POST] to [https://wearableapi.planetwatch.io/api/data/devicedata] [PWClient#sendData(PWData)]: []
    at feign.FeignException.clientErrorStatus(FeignException.java:215) ~[feign-core-11.8.jar:na]
    at feign.FeignException.errorStatus(FeignException.java:194) ~[feign-core-11.8.jar:na]
    at feign.FeignException.errorStatus(FeignException.java:185) ~[feign-core-11.8.jar:na]
    at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:92) ~[feign-core-11.8.jar:na]
    at feign.AsyncResponseHandler.handleResponse(AsyncResponseHandler.java:96) ~[feign-core-11.8.jar:na]
    at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138) ~[feign-core-11.8.jar:na]
    at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89) ~[feign-core-11.8.jar:na]
    at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100) ~[feign-core-11.8.jar:na]
    at jdk.proxy2/jdk.proxy2.$Proxy70.sendData(Unknown Source) ~[na:na]
    at jdk.internal.reflect.GeneratedMethodAccessor34.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89) ~[spring-aop-5.3.18.jar:5.3.18]
    at io.github.resilience4j.retry.Retry.lambda$decorateCheckedSupplier$3f69f149$1(Retry.java:137) ~[resilience4j-retry-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.Retry.executeCheckedSupplier(Retry.java:419) ~[resilience4j-retry-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.handleDefaultJoinPoint(RetryAspect.java:184) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.proceed(RetryAspect.java:141) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.retryAroundAdvice(RetryAspect.java:120) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at jdk.internal.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) ~[spring-aop-5.3.18.jar:5.3.18]
    at jdk.proxy2/jdk.proxy2.$Proxy71.sendData(Unknown Source) ~[na:na]
    at com.pw.awairbridge.service.impl.DataBridgeImpl.runService(DataBridgeImpl.java:113) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84) ~[spring-context-5.3.18.jar:5.3.18]
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-5.3.18.jar:5.3.18]
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[na:na]
    at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[na:na]
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
    at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

2022-04-05 14:51:55.514  INFO 1 --- [   scheduling-1] com.pw.awairbridge.util.PWAuthService    : Logging in PW
2022-04-05 14:51:57.833  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T14:51:57.833652494Z[Etc/UTC]: Retry 'pw-auth', waiting PT1M until attempt '1'. Last attempt failed with exception 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 14:52:58.212  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T14:52:58.211789173Z[Etc/UTC]: Retry 'pw-auth', waiting PT1M until attempt '2'. Last attempt failed with exception 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 14:53:58.353  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T14:53:58.352832687Z[Etc/UTC]: Retry 'pw-auth', waiting PT1M until attempt '3'. Last attempt failed with exception 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 14:54:58.710  INFO 1 --- [   scheduling-1] com.pw.awairbridge.config.BeanConfig     : 2022-04-05T14:54:58.710583240Z[Etc/UTC]: Retry 'pw-auth' recorded a failed retry attempt. Number of retry attempts: '4'. Giving up. Last exception was: 'feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]'.
2022-04-05 14:54:59.258 ERROR 1 --- [   scheduling-1] o.s.s.s.TaskUtils$LoggingErrorHandler    : Unexpected error occurred in scheduled task

feign.FeignException$Forbidden: [403 Forbidden] during [POST] to [https://login.planetwatch.io/auth/realms/Planetwatch/protocol/openid-connect/auth] [PWAuthClient#openIDAuth(Map)]: [error code: 1020]
    at feign.FeignException.clientErrorStatus(FeignException.java:217) ~[feign-core-11.8.jar:na]
    at feign.FeignException.errorStatus(FeignException.java:194) ~[feign-core-11.8.jar:na]
    at feign.FeignException.errorStatus(FeignException.java:185) ~[feign-core-11.8.jar:na]
    at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:92) ~[feign-core-11.8.jar:na]
    at feign.AsyncResponseHandler.handleResponse(AsyncResponseHandler.java:96) ~[feign-core-11.8.jar:na]
    at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138) ~[feign-core-11.8.jar:na]
    at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89) ~[feign-core-11.8.jar:na]
    at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100) ~[feign-core-11.8.jar:na]
    at jdk.proxy2/jdk.proxy2.$Proxy73.openIDAuth(Unknown Source) ~[na:na]
    at jdk.internal.reflect.GeneratedMethodAccessor38.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89) ~[spring-aop-5.3.18.jar:5.3.18]
    at io.github.resilience4j.retry.Retry.lambda$decorateCheckedSupplier$3f69f149$1(Retry.java:137) ~[resilience4j-retry-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.Retry.executeCheckedSupplier(Retry.java:419) ~[resilience4j-retry-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.handleDefaultJoinPoint(RetryAspect.java:184) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.proceed(RetryAspect.java:141) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at io.github.resilience4j.retry.configure.RetryAspect.retryAroundAdvice(RetryAspect.java:120) ~[resilience4j-spring-1.7.0.jar:1.7.0]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.18.jar:5.3.18]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) ~[spring-aop-5.3.18.jar:5.3.18]
    at jdk.proxy2/jdk.proxy2.$Proxy74.openIDAuth(Unknown Source) ~[na:na]
    at com.pw.awairbridge.util.PWAuthService.doLogin(PWAuthService.java:44) ~[classes/:na]
    at com.pw.awairbridge.service.impl.DataBridgeImpl.doLogin(DataBridgeImpl.java:57) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84) ~[spring-context-5.3.18.jar:5.3.18]
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-5.3.18.jar:5.3.18]
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[na:na]
    at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[na:na]
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
    at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
redpizza69 commented 2 years ago

I have yet to get a successful logon to PW. I have been getting "403 Forbidden" / "Error Code 1020" as above. Container has been running for around 5 hours so far. I'm running Docker on a Intel NUC running Ubuntu 20.04 on a domestic broadband connection (not cloud / not commercial)

wwadge commented 2 years ago

Try this: AUTHORIZATION_CODE_LOGIN_PASSWORD=your-pw-password ./pwlogin.sh -a "https://login.planetwatch.io/auth" -r "Planetwatch" -c "external-login" -l "http://localhost:33333/keycloak-redirect" -u yourplanetwatchusername@foo.com

wwadge commented 2 years ago

See if it succeeds

redpizza69 commented 2 years ago

Sorry, where do I run this? I'm running your container via Docker Compose. I can get to the container command line via portainer... after that my Docker knowledge is rapidly declining....

wwadge commented 2 years ago

In this git repo there's this script, run it manually on the command line. It uses curl to do auth. If that fails for you then you're getting network blocked

shackrock commented 2 years ago

Same as others here. Not in a datacenter or VPS. Running locally on my PC with local ISP and can’t authenticate. I will take a try at the script later today hopefully as suggested though.

redpizza69 commented 2 years ago

AUTHORIZATION_CODE_LOGIN_PASSWORD=my_pw_password ./pwLogin.sh -a "https://login.planetwatch.io/auth" -r "Planetwatch" -c "external-login" -l "http://localhost:33333/keycloak-redirect" -u idiot@fool.com

curl: (3) URL using bad/illegal format or missing URL null

wwadge commented 2 years ago

So yes, you're network/tls signature blocked, curl has failed too at your site

shackrock commented 2 years ago

@wwadge you are saying that cloudwatch is what PlanetWatch is using, and PW is the one doing the blocking basically, right? Do we have any way to pass this feedback to them? This solution is far superior (if we can get it functional) to the GUI version that was widely advertised, if you ask me. Any ideas here or we basically just wait and see if PW makes a change that lets this function?

does it work on your end (and if so, why do you think it works on your end and not other domestic IPs)? THANKS!

wwadge commented 2 years ago

Planetwatch use CloudWatch and CloudWatch thinks this app is a bot. I have notified PW already.

On my end it works randomly, just like everyone else

hope4555 commented 2 years ago

Still getting 403, any updates on that? also UI version stopped working today

wwadge commented 2 years ago

See AMA/twitter/youtube. All these tools (including this project) are now redundant