dvankley / firefly-plaid-connector-2

Connector to pull Plaid financial data into the Firefly finance tool
GNU General Public License v3.0
94 stars 14 forks source link

Polled mode error: Application run failed #51

Closed bobbymr closed 8 months ago

bobbymr commented 8 months ago

Hi, I believe this is similar issue as #15. I got the below error, any approach on how to resolve this?

firefly-iii-plaid_polled-1  | ERROR 1 --- [           main] o.s.boot.SpringApplication               : Application run failed
firefly-iii-plaid_polled-1  | 
firefly-iii-plaid_polled-1  | java.lang.reflect.UndeclaredThrowableException: Failed to invoke event listener method
firefly-iii-plaid_polled-1  | HandlerMethod details: 
firefly-iii-plaid_polled-1  | Bean [net.djvk.fireflyPlaidConnector2.FireflyPlaidConnector2Application$$SpringCGLIB$$0]
firefly-iii-plaid_polled-1  | Method [public void net.djvk.fireflyPlaidConnector2.FireflyPlaidConnector2Application.appReady()]
firefly-iii-plaid_polled-1  | Resolved arguments: 
firefly-iii-plaid_polled-1  | 
firefly-iii-plaid_polled-1  |   at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:365) ~[spring-context-6.0.12.jar:6.0.12]
firefly-iii-plaid_polled-1  |   at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:233) ~[spring-context-6.0.12.jar:6.0.12]
firefly-iii-plaid_polled-1  |   at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:165) ~[spring-context-6.0.12.jar:6.0.12]
firefly-iii-plaid_polled-1  |   at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:174) ~[spring-context-6.0.12.jar:6.0.12]
firefly-iii-plaid_polled-1  |   at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167) ~[spring-context-6.0.12.jar:6.0.12]
firefly-iii-plaid_polled-1  |   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:145) ~[spring-context-6.0.12.jar:6.0.12]
firefly-iii-plaid_polled-1  |   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:437) ~[spring-context-6.0.12.jar:6.0.12]
firefly-iii-plaid_polled-1  |   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:370) ~[spring-context-6.0.12.jar:6.0.12]
firefly-iii-plaid_polled-1  |   at org.springframework.boot.context.event.EventPublishingRunListener.ready(EventPublishingRunListener.java:109) ~[spring-boot-3.1.4.jar:3.1.4]
firefly-iii-plaid_polled-1  |   at org.springframework.boot.SpringApplicationRunListeners.lambda$ready$6(SpringApplicationRunListeners.java:80) ~[spring-boot-3.1.4.jar:3.1.4]
firefly-iii-plaid_polled-1  |   at java.base/java.lang.Iterable.forEach(Unknown Source) ~[na:na]
firefly-iii-plaid_polled-1  |   at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:118) ~[spring-boot-3.1.4.jar:3.1.4]
firefly-iii-plaid_polled-1  |   at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:112) ~[spring-boot-3.1.4.jar:3.1.4]
firefly-iii-plaid_polled-1  |   at org.springframework.boot.SpringApplicationRunListeners.ready(SpringApplicationRunListeners.java:80) ~[spring-boot-3.1.4.jar:3.1.4]
firefly-iii-plaid_polled-1  |   at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) ~[spring-boot-3.1.4.jar:3.1.4]
firefly-iii-plaid_polled-1  |   at org.springframework.boot.SpringApplication.run(SpringApplication.java:1309) ~[spring-boot-3.1.4.jar:3.1.4]
firefly-iii-plaid_polled-1  |   at org.springframework.boot.SpringApplication.run(SpringApplication.java:1298) ~[spring-boot-3.1.4.jar:3.1.4]
firefly-iii-plaid_polled-1  |   at net.djvk.fireflyPlaidConnector2.FireflyPlaidConnector2ApplicationKt.main(FireflyPlaidConnector2Application.kt:31) ~[classes/:1.0.8]
firefly-iii-plaid_polled-1  |   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
firefly-iii-plaid_polled-1  |   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
firefly-iii-plaid_polled-1  |   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
firefly-iii-plaid_polled-1  |   at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
firefly-iii-plaid_polled-1  |   at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[workspace/:na]
firefly-iii-plaid_polled-1  |   at org.springframework.boot.loader.Launcher.launch(Launcher.java:95) ~[workspace/:na]
firefly-iii-plaid_polled-1  |   at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[workspace/:na]
firefly-iii-plaid_polled-1  |   at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) ~[workspace/:na]
firefly-iii-plaid_polled-1  | Caused by: io.ktor.client.network.sockets.ConnectTimeoutException: Connect timeout has expired [url=http://192.168.3.219:8080/api/v1/transactions?page=0&start=2023-12-08&end=2023-12-28&type=all, connect_timeout=unknown ms]
firefly-iii-plaid_polled-1  |   at io.ktor.client.plugins.HttpTimeoutKt.ConnectTimeoutException(HttpTimeout.kt:213) ~[ktor-client-core-jvm-2.3.4.jar:2.3.4]
firefly-iii-plaid_polled-1  |   at io.ktor.client.plugins.HttpTimeoutKt.ConnectTimeoutException$default(HttpTimeout.kt:210) ~[ktor-client-core-jvm-2.3.4.jar:2.3.4]
firefly-iii-plaid_polled-1  |   at io.ktor.client.engine.cio.Endpoint.getTimeoutException(Endpoint.kt:268) ~[ktor-client-cio-jvm-2.3.4.jar:2.3.4]
firefly-iii-plaid_polled-1  |   at io.ktor.client.engine.cio.Endpoint.connect(Endpoint.kt:257) ~[ktor-client-cio-jvm-2.3.4.jar:2.3.4]
firefly-iii-plaid_polled-1  |   at io.ktor.client.engine.cio.Endpoint.access$connect(Endpoint.kt:25) ~[ktor-client-cio-jvm-2.3.4.jar:2.3.4]
firefly-iii-plaid_polled-1  |   at io.ktor.client.engine.cio.Endpoint$connect$1.invokeSuspend(Endpoint.kt) ~[ktor-client-cio-jvm-2.3.4.jar:2.3.4]
firefly-iii-plaid_polled-1  |   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) ~[kotlin-stdlib-1.9.10.jar:1.9.10-release-459]
firefly-iii-plaid_polled-1  |   at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
firefly-iii-plaid_polled-1  |   at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
firefly-iii-plaid_polled-1  |   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) ~[kotlin-stdlib-1.9.10.jar:1.9.10-release-459]
firefly-iii-plaid_polled-1  |   at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
firefly-iii-plaid_polled-1  |   at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
firefly-iii-plaid_polled-1  |   at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
firefly-iii-plaid_polled-1  |   at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
firefly-iii-plaid_polled-1  |   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
firefly-iii-plaid_polled-1  |   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
firefly-iii-plaid_polled-1  |   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
firefly-iii-plaid_polled-1  | 
firefly-iii-plaid_polled-1  | 2023-12-28T02:34:50.412Z  INFO 1 --- [           main] n.d.f.sync.PolledSyncRunner              : Shutting down class net.djvk.fireflyPlaidConnector2.sync.PolledSyncRunner
firefly-iii-plaid_polled-1  | 
firefly-iii-plaid_polled-1  | Native Memory Tracking:
firefly-iii-plaid_polled-1  | 
firefly-iii-plaid_polled-1  | Total: reserved=19476601871, committed=442846223
firefly-iii-plaid_polled-1  |        malloc: 53259279 #219679
firefly-iii-plaid_polled-1  |        mmap:   reserved=19423342592, committed=389586944
firefly-iii-plaid_polled-1  | 
firefly-iii-plaid_polled-1  | -                 Java Heap (reserved=18253611008, committed=285212672)
firefly-iii-plaid_polled-1  |                             (mmap: reserved=18253611008, committed=285212672) 
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1  | -                     Class (reserved=84571180, committed=4813868)
firefly-iii-plaid_polled-1  |                             (classes #7581)
firefly-iii-plaid_polled-1  |                             (  instance classes #7096, array classes #485)
firefly-iii-plaid_polled-1  |                             (malloc=685100 #14933) 
firefly-iii-plaid_polled-1  |                             (mmap: reserved=83886080, committed=4128768) 
firefly-iii-plaid_polled-1  |                             (  Metadata:   )
firefly-iii-plaid_polled-1  |                             (    reserved=67108864, committed=29032448)
firefly-iii-plaid_polled-1  |                             (    used=28818432)
firefly-iii-plaid_polled-1  |                             (    waste=214016 =0.74%)
firefly-iii-plaid_polled-1  |                             (  Class space:)
firefly-iii-plaid_polled-1  |                             (    reserved=83886080, committed=4128768)
firefly-iii-plaid_polled-1  |                             (    used=3896960)
firefly-iii-plaid_polled-1  |                             (    waste=231808 =5.61%)
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1  | -                    Thread (reserved=36884416, committed=2101184)
firefly-iii-plaid_polled-1  |                             (thread #35)
firefly-iii-plaid_polled-1  |                             (stack: reserved=36782080, committed=1998848)
firefly-iii-plaid_polled-1  |                             (malloc=58488 #238) 
firefly-iii-plaid_polled-1  |                             (arena=43848 #75)
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1  | -                      Code (reserved=254435480, committed=14282904)
firefly-iii-plaid_polled-1  |                             (malloc=806080 #5346) 
firefly-iii-plaid_polled-1  |                             (mmap: reserved=253628416, committed=13475840) 
firefly-iii-plaid_polled-1  |                             (arena=984 #1)
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1  | -                        GC (reserved=744630983, committed=77834951)
firefly-iii-plaid_polled-1  |                             (malloc=33127111 #3348) 
firefly-iii-plaid_polled-1  |                             (mmap: reserved=711503872, committed=44707840) 
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1  | -                  Compiler (reserved=5086868, committed=5086868)
firefly-iii-plaid_polled-1  |                             (malloc=57428 #457) 
firefly-iii-plaid_polled-1  |                             (arena=5029440 #15)
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1  | -                  Internal (reserved=314950, committed=314950)
firefly-iii-plaid_polled-1  |                             (malloc=278086 #5878) 
firefly-iii-plaid_polled-1  |                             (mmap: reserved=36864, committed=36864) 
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1  | -                     Other (reserved=12288, committed=12288)
firefly-iii-plaid_polled-1  |                             (malloc=12288 #1) 
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1  | -                    Symbol (reserved=9226864, committed=9226864)
firefly-iii-plaid_polled-1  |                             (malloc=8858224 #187524) 
firefly-iii-plaid_polled-1  |                             (arena=368640 #1)
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1  | -    Native Memory Tracking (reserved=3522904, committed=3522904)
firefly-iii-plaid_polled-1  |                             (malloc=8024 #113) 
firefly-iii-plaid_polled-1  |                             (tracking overhead=3514880)
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1  | -        Shared class space (reserved=16777216, committed=10985472)
firefly-iii-plaid_polled-1  |                             (mmap: reserved=16777216, committed=10985472) 
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1  | -               Arena Chunk (reserved=137008, committed=137008)
firefly-iii-plaid_polled-1  |                             (malloc=137008) 
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1  | -                   Tracing (reserved=345, committed=345)
firefly-iii-plaid_polled-1  |                             (malloc=345 #9) 
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1  | -                 Arguments (reserved=169, committed=169)
firefly-iii-plaid_polled-1  |                             (malloc=169 #5) 
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1  | -                    Module (reserved=63920, committed=63920)
firefly-iii-plaid_polled-1  |                             (malloc=63920 #720) 
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1  | -                 Safepoint (reserved=8192, committed=8192)
firefly-iii-plaid_polled-1  |                             (mmap: reserved=8192, committed=8192) 
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1  | -           Synchronization (reserved=66992, committed=66992)
firefly-iii-plaid_polled-1  |                             (malloc=66992 #772) 
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1  | -            Serviceability (reserved=672, committed=672)
firefly-iii-plaid_polled-1  |                             (malloc=672 #6) 
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1  | -                 Metaspace (reserved=67244928, committed=29168512)
firefly-iii-plaid_polled-1  |                             (malloc=136064 #68) 
firefly-iii-plaid_polled-1  |                             (mmap: reserved=67108864, committed=29032448) 
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1  | -      String Deduplication (reserved=704, committed=704)
firefly-iii-plaid_polled-1  |                             (malloc=704 #8) 
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1  | -           Object Monitors (reserved=4784, committed=4784)
firefly-iii-plaid_polled-1  |                             (malloc=4784 #23) 
firefly-iii-plaid_polled-1  |  
firefly-iii-plaid_polled-1 exited with code 1

Caused by: io.ktor.client.network.sockets.ConnectTimeoutException: Connect timeout has expired.

In Batch Mode I see the below error


firefly-iii-plaid-1  | ERROR 1 --- [           main] n.d.f.sync.SyncHelper                    : Timeout inserting firefly tx; skipping for now: FireflyTransactionDto(id=null, tx=TransactionSplit(type=withdrawal, date=2023-12-23T00:00-07:00, amount=45.71, description=TRANSFER - 41, AMOUNT:-45.71,  MONTHLY PAYMENT, sourceId=4, destinationId=null, user=null, transactionJournalId=null, order=0, currencyId=null, currencyCode=null, currencySymbol=null, currencyName=null, currencyDecimalPlaces=null, foreignCurrencyId=null, foreignCurrencyCode=null, foreignCurrencySymbol=null, foreignCurrencyDecimalPlaces=null, foreignAmount=0, sourceName=null, sourceIban=null, sourceType=null, destinationName=TRANSFER - 41, AMOUNT:-45.71,  MONTHLY PAYMENT, destinationIban=null, destinationType=null, budgetId=null, budgetName=null, categoryId=null, categoryName=null, billId=null, billName=null, reconciled=false, notes=null, tags=[plaid-primary-cat-payments, plaid-detailed-cat-payment], internalReference=null, externalId=plaid-, externalUrl=null, originalSource=null, recurrenceId=null, recurrenceTotal=null, recurrenceCount=null, bunqPaymentId=null, importHashV2=null, sepaCc=null, sepaCtOp=null, sepaCtId=null, sepaDb=null, sepaCountry=null, sepaEp=null, sepaCi=null, sepaBatchId=null, interestDate=null, bookDate=null, processDate=null, dueDate=null, paymentDate=null, invoiceDate=null, latitude=null, longitude=null, zoomLevel=null, hasAttachments=null))

firefly-iii-plaid-1  | io.ktor.client.network.sockets.ConnectTimeoutException: Connect timeout has expired [url=http://192.168.3.219:8080/api/v1/transactions, connect_timeout=unknown ms]
firefly-iii-plaid-1  |  at io.ktor.client.plugins.HttpTimeoutKt.ConnectTimeoutException(HttpTimeout.kt:213) ~[ktor-client-core-jvm-2.3.4.jar:2.3.4]
firefly-iii-plaid-1  |  at io.ktor.client.plugins.HttpTimeoutKt.ConnectTimeoutException$default(HttpTimeout.kt:210) ~[ktor-client-core-jvm-2.3.4.jar:2.3.4]
firefly-iii-plaid-1  |  at io.ktor.client.engine.cio.Endpoint.getTimeoutException(Endpoint.kt:268) ~[ktor-client-cio-jvm-2.3.4.jar:2.3.4]
firefly-iii-plaid-1  |  at io.ktor.client.engine.cio.Endpoint.connect(Endpoint.kt:257) ~[ktor-client-cio-jvm-2.3.4.jar:2.3.4]
firefly-iii-plaid-1  |  at io.ktor.client.engine.cio.Endpoint.access$connect(Endpoint.kt:25) ~[ktor-client-cio-jvm-2.3.4.jar:2.3.4]
firefly-iii-plaid-1  |  at io.ktor.client.engine.cio.Endpoint$connect$1.invokeSuspend(Endpoint.kt) ~[ktor-client-cio-jvm-2.3.4.jar:2.3.4]
firefly-iii-plaid-1  |  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) ~[kotlin-stdlib-1.9.10.jar:1.9.10-release-459]
firefly-iii-plaid-1  |  at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
firefly-iii-plaid-1  |  at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
firefly-iii-plaid-1  |  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) ~[kotlin-stdlib-1.9.10.jar:1.9.10-release-459]
firefly-iii-plaid-1  |  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
firefly-iii-plaid-1  |  at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
firefly-iii-plaid-1  |  at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
firefly-iii-plaid-1  |  at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
firefly-iii-plaid-1  |  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
firefly-iii-plaid-1  |  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
firefly-iii-plaid-1  |  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
dvankley commented 8 months ago

https://github.com/dvankley/firefly-plaid-connector-2/issues/15 was an issue with unexpected JSON parameters not being handled correctly.

Your issue appears to be a garden variety failure to make a network connection. Are you certain your Firefly connection configuration is correct? Does http://192.168.3.219:8080 resolve from wherever you're running the connector?

bobbymr commented 8 months ago

I restarted the Firefly-iii and plaid connector containers and the polled mode is running as expected now. Not sure if restart resolved the issue, but I don't see any errors now