Closed Lootwig closed 5 years ago
Got the same exception, could be caused by the new flutter plugin release.
Edit: Another error occured after restarting intellij idea
kotlin.KotlinNullPointerException at eu.long1.flutter.i18n.workers.I18nFileGenerator.generate(I18nFileGenerator.kt:42) at eu.long1.flutter.i18n.workers.Initializer$runActivity$$inlined$scheduleAtFixedRate$1$lambda$1.compute(actions.kt:74) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:922) at eu.long1.flutter.i18n.workers.Initializer$runActivity$$inlined$scheduleAtFixedRate$1.run(Timer.kt:150) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506)
This will be fixed once #98 is merged.
This is now resolved in v1.1.0. Please upgrade through the Plugins page in your IDE.
Sadly, the issue has not been resolved yet:
kotlin.KotlinNullPointerException at eu.long1.flutter.i18n.workers.I18nFileGenerator.generate(I18nFileGenerator.kt:57) at eu.long1.flutter.i18n.workers.Initializer$runActivity$$inlined$scheduleAtFixedRate$1$lambda$1$1.compute(actions.kt:74) at com.intellij.openapi.application.impl.ApplicationImpl.lambda$runWriteAction$16(ApplicationImpl.java:1004) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:982) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1004) at eu.long1.flutter.i18n.workers.Initializer$runActivity$$inlined$scheduleAtFixedRate$1$lambda$1.run(Initializer.kt:286) at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:312) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:433) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:416) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:399) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:824) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:773) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:412) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:704) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:411) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Using Intellij IDEA 2019.2.3 and Flutter dev 1.10.14
Thanks for the report, appreciate it. I'm assuming this error is just informative and the plugin succeeds in generating the i18n file, is this correct?
No, i18n.dart file hasn't changed since the plugin stopped working. Adding fields to the language arb-files does not re-generate i18n.dart file.
Hmm, I'm stumped. I am still unable to reproduce this behaviour on my IDE...
Found the issue: Apparently, flutter_i18n at some point stopped parsing country codes for .arb files (e.g. "strings_en_US.arb"). Removed the country codes and the plugin started working as usual.
However, I cannot recall if this was supported at all so, my bad ^^
Got this error - might be an easy one given the assertion message: