I have been using the Relay for Figma plugin in Android Studio.
Two days ago, I started receiving an error and I have not been able import the Figma file.
Android Studio Dolphin | 2021.3.1 Patch 1 Build #AI-213.7172.25.2113.9123335
JDK: 11.0.13; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
OS: Windows 10
Plugin to blame: Relay for Android Studio version: 0.3.01
This is the Adroid Studio error log:
`
INFO - o.plugin.importer.FigmaService - fetching UI Package from Figma
WARN - o.plugin.importer.FigmaService - Unable to set permissions on C:UsersdeveloperAppDataRoamingGoogleAndroidStudio2021.3pluginsrelay_android_studiobinwin64figma_to_adin: null
INFO - .plugin.utilities.ShellCommand - Running shell command: C:UsersdeveloperAppDataRoamingGoogleAndroidStudio2021.3pluginsrelay_android_studiobinwin64figma_to_adin
INFO - .plugin.utilities.ShellCommand - Shell command returned value: 2
INFO - .plugin.utilities.ShellCommand - Shell command stdOut:
INFO - .plugin.utilities.ShellCommand - Shell command stdErr: Severe: Failed to transform https://www.figma.com/file/8lPrZW0qV8DVxbeDuTpWVw/HelloFigma?node-id=0%3A1&t=F47q81Q6Ir5WFqex-1&version-id=2763233317:
NoSuchMethodError: The getter 'entries' was called on null.
Receiver: null
Tried calling: entries
#0 _componentsFromJson (package:figma_to_adin/src/figma_client.dart:392)
#1 _$FileResponseFromJson (package:figma_to_adin/src/figma_client.g.dart:17)
#2 new FileResponse.fromJson (package:figma_to_adin/src/figma_client.dart:343)
#3 FigmaClient.getFile (package:figma_to_adin/src/figma_client.dart:80)
<asynchronous suspension>
#4 FigmaRestDataResolver.resolveAll (package:figma_to_adin/src/figma_data.dart:172)
<asynchronous suspension>
#5 resolveUIPackagesSet (package:figma_to_adin/src/figma_resolver.dart:31)
<asynchronous suspension>
#6 main (file:///t:/src/git/montage/figma_to_adin/bin/figma_to_adin.dart:111)
<asynchronous suspension>
ERROR - gin.importer.FigmaImportWorker - null
com.google.relay.androidstudio.plugin.importer.FigmaServiceException: Command:
C:UsersdeveloperAppDataRoamingGoogleAndroidStudio2021.3pluginsrelay_android_studiobinwin64figma_to_adin
Stack Trace:
Severe: Failed to transform https://www.figma.com/file/8lPrZW0qV8DVxbeDuTpWVw/HelloFigma?node-id=0%3A1&t=F47q81Q6Ir5WFqex-1&version-id=2763233317:
NoSuchMethodError: The getter 'entries' was called on null.
Receiver: null
Tried calling: entries
#0 _componentsFromJson (package:figma_to_adin/src/figma_client.dart:392)
#1 _$FileResponseFromJson (package:figma_to_adin/src/figma_client.g.dart:17)
#2 new FileResponse.fromJson (package:figma_to_adin/src/figma_client.dart:343)
#3 FigmaClient.getFile (package:figma_to_adin/src/figma_client.dart:80)
<asynchronous suspension>
#4 FigmaRestDataResolver.resolveAll (package:figma_to_adin/src/figma_data.dart:172)
<asynchronous suspension>
#5 resolveUIPackagesSet (package:figma_to_adin/src/figma_resolver.dart:31)
<asynchronous suspension>
#6 main (file:///t:/src/git/montage/figma_to_adin/bin/figma_to_adin.dart:111)
<asynchronous suspension>
at com.google.relay.androidstudio.plugin.importer.FigmaService.importFile(FigmaService.kt:279)
at com.google.relay.androidstudio.plugin.importer.FigmaService.importPackagesToTemp(FigmaService.kt:127)
at com.google.relay.androidstudio.plugin.importer.FigmaImportWorker.doInBackground(FigmaImportWorker.java:71)
at com.google.relay.androidstudio.plugin.importer.FigmaImportWorker.doInBackground(FigmaImportWorker.java:26)
at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
ERROR - gin.importer.FigmaImportWorker - Android Studio Dolphin | 2021.3.1 Patch 1 Build #AI-213.7172.25.2113.9123335
ERROR - gin.importer.FigmaImportWorker - JDK: 11.0.13; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
ERROR - gin.importer.FigmaImportWorker - OS: Windows 10
ERROR - gin.importer.FigmaImportWorker - Plugin to blame: Relay for Android Studio version: 0.3.01
ERROR - gin.importer.FigmaImportWorker - Last Action: EditorPaste
It may be a coincidence, but the day before I started receiving this error, I updated windows 10 with pack December 13, 2022âKB5021233 (OS Builds 19042.2364, 19043.2364, 19044.2364, and 19045.2364)
I receive the error using the files available in the Relay for Figma tutorial.
They have worked before.
I removed and installed the plugin again.
I checked the permission for the directory "…AndroidStudio2021.3pluginsrelay_android_studiobinwin64", given the log message "Unable to set permissions on…"
Has anyone seen the same errors? Suggestions on what I should try?
2
Answers
Today I was able to import the Figma file. There were no changes in my computers from yesterday to today, so I assume Figma modified some file format or Relay for Figma had some internal bug that was fixed.
I was not able to find any documentation or information about it.
I had the same problem a few days ago, I raised the issue here and got a reply, simply put, it’s a google services API issue, so the fix is on the server side, no need to reinstall relay