Android Studio - Relay for Figma plugin - Figma Importer error - android-studio

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:\Users\developer\AppData\Roaming\Google\AndroidStudio2021.3\plugins\relay_android_studio\bin\win64\figma_to_adin: null
INFO - .plugin.utilities.ShellCommand - Running shell command: C:\Users\developer\AppData\Roaming\Google\AndroidStudio2021.3\plugins\relay_android_studio\bin\win64\figma_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:\Users\developer\AppData\Roaming\Google\AndroidStudio2021.3\plugins\relay_android_studio\bin\win64\figma_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.3\plugins\relay_android_studio\bin\win64", given the log message "Unable to set permissions on..."
Has anyone seen the same errors? Suggestions on what I should try?

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

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.

Related

snap install of Viber on Ubuntu 20.04 Focal Fossa Linux produces permission denied error

I have tried two different Viber packages available through snap, viber-unofficial.viber and viber-mtd.viber. Both packages produce the exact same error about WebEngine resources not found
sh: 1: xdg-mime: not found
Qt WebEngine ICU data not found at /snap/viber-unofficial/37/opt/viber/resources. Trying parent directory...
Qt WebEngine resources not found at /snap/viber-unofficial/37/opt/viber/resources. Trying parent directory...
[557326:557326:1013/081811.896484:FATAL:credentials.cc(155)] Check failed: NamespaceUtils::DenySetgroups(). : Permission denied
#0 0x7f5a59d4d11e base::debug::StackTrace::StackTrace()
#1 0x7f5a59d5dbde logging::LogMessage::~LogMessage()
#2 0x7f5a59d5de99 logging::ErrnoLogMessage::~ErrnoLogMessage()
#3 0x7f5a5aa4ff7c sandbox::(anonymous namespace)::SetGidAndUidMaps()
#4 0x7f5a5aa505d5 sandbox::Credentials::CanCreateProcessInNewUserNS()
#5 0x7f5a599c0de5 content::ZygoteHostImpl::Init()
#6 0x7f5a59673314 content::BrowserMainLoop::EarlyInitialization()
#7 0x7f5a59677190 content::BrowserMainRunnerImpl::Initialize()
#8 0x7f5a5947cd19 QtWebEngineCore::WebEngineContext::WebEngineContext()
#9 0x7f5a5947e135 QtWebEngineCore::WebEngineContext::current()
#10 0x7f5a5941b931 QtWebEngineCore::BrowserContextAdapter::defaultContext()
#11 0x7f5a6258c618 QQuickWebEngineProfile::defaultProfile()
#12 0x0000006ac8bf ApplicationPrivate::preRunningInitialization()
#13 0x0000006a6504 ViberApplication::start()
#14 0x00000067e25b ViberMain()
#15 0x7f5a56403840 __libc_start_main
#16 0x0000004d7047 <unknown>
Qt WebEngine ICU data not found at /snap/viber-unofficial/37/opt/viber/resources. Trying parent directory...
Qt WebEngine resources not found at /snap/viber-unofficial/37/opt/viber/resources. Trying parent directory...
I have looked at the permissions of the various directories and I don't see anything obvious other than everything in the snap package is all owned by root/root and the regular user trying to actually run the viber app does not have any write permission into these directories.

Android Studio Flutter debugging FileSystemException

I am developing a Flutter application in Android Studio. When I place a breakpoint somewhere in the code it gets hit and execution stops, but after half a second the application exits with the following error:
Unhandled exception:
FileSystemException: Cannot open file, path = 'build\app.dill.track.dill.incremental.dill' (OS Error: The requested operation cannot be performed on a file with a user-mapped section open.
, errno = 1224)
#0 _File.open.<anonymous closure> (dart:io/file_impl.dart:364:9)
#1 _RootZone.runUnary (dart:async/zone.dart:1379:54)
#2 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#3 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#4 Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#5 Future._completeWithValue (dart:async/future_impl.dart:483:5)
#6 Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:513:7)
#7 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#8 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#9 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)
#10 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)
Unhandled exception:
SocketException: Write failed (OS Error: The pipe is being closed.
, errno = 232), port = 0
#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:1112:29)
#1 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#2 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)
If I run application without debugging it works normally. Has anyone had similar error and solved it successfully?
The breakpoint seems to work as expected. What happens here looks like a function in the app expects a value that wasn't provided after the breakpoint. Debug the app by checking if there's any function expecting a value that's blocked by the breakpoint.

Cannot extract a file path from a package URI error in Flutter but I'm not using URI package

i have just update my Mac to Mojave with a Clean installation, so I re-installed all my apps including Android Studio and Flutter, as the first time, i followed the Flutter installation guide. I got this error at re-opening an previous project, but if i create a new Flutter project I don't have problems, I tried to remake all project copying the code but I got the same errors:
Unhandled exception:
Unsupported operation: Cannot extract a file path from a package URI
#0 _SimpleUri.toFilePath (dart:core/uri.dart:4589:7)
#1 _writeDepfile (package:vm/frontend_server.dart:662:32)
<asynchronous suspension>
#2 FrontendCompiler.compile (package:vm/frontend_server.dart:367:15)
<asynchronous suspension>
#3 _FlutterFrontendCompiler.compile (package:frontend_server/server.dart:31:22)
<asynchronous suspension>
#4 starter (package:frontend_server/server.dart:133:27)
<asynchronous suspension>
#5 main (file:///b/build/slave/Mac_Engine/build/src/flutter/frontend_server/bin/starter.dart:8:30)
<asynchronous suspension>
#6 _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:287:32)
#7 _RawReceivePortImpl._handleMessage
(dart:isolate/runtime/libisolate_patch.dart:171:12)
Compiler failed on /Users/rodhcraft/Documents/LotusXD/Codes/para_llevar/lib/main.dart
Error launching application on iPhone XS Max.
Looks like this known issue https://github.com/flutter/flutter/issues/22721
that was fixed upstream and should land in Flutter master channel soon (or has already landed)

Xcode 9 Beta 2 fails - DVTPlugInErrorDomain plugin load fails

After downloading from Apple's site and installing Xcode 9 beta 2, it fails to launch on Sierra OS X version 10.12.5 with a following bug report:
Process: Xcode [4789] Path:
/Applications/Xcode-beta.app/Contents/MacOS/Xcode Identifier:
com.apple.dt.Xcode Version: 9.0 (13158.29) Build Info:
IDEFrameworks-13158029000000000~6 Code Type: X86-64
(Native) Parent Process: ??? [1] Responsible: Xcode
[4789] User ID: 501
Date/Time: 2017-07-10 09:27:38.822 +0300 OS Version:
Mac OS X 10.12.5 (16F73) Report Version: 12 Anonymous UUID:
D8406E47-CD80-D96B-2976-599E84980DE2
Sleep/Wake UUID: A8F0AF0B-2FF1-45A9-89AD-505F25730705
Time Awake Since Boot: 20000 seconds Time Since Wake: 3800
seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT) Exception Codes:
0x0000000000000000, 0x0000000000000000 Exception Note:
EXC_CORPSE_NOTIFY
Application Specific Information: ProductBuildVersion: 9M137d UNCAUGHT
EXCEPTION (NSInternalInconsistencyException): Error getting value for
parameter key 'name' of extension
'Xcode.InterfaceBuilderKit.PepperIntegration.Singletons' in plug-in
'com.apple.dt.IDE.IDEInterfaceBuilderWatchKitIntegration' UserInfo: {
NSUnderlyingError = "Error Domain=DVTPlugInErrorDomain Code=2 \"Loading a plug-in failed.\"
UserInfo={DVTPlugInIdentifierErrorKey=com.apple.dt.IDE.IDEInterfaceBuilderCocoaTouchIntegration,
DVTPlugInExecutablePathErrorKey=/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration,
NSLocalizedRecoverySuggestion=The plug-in or one of its prerequisite
plug-ins may be missing or damaged and may need to be reinstalled.,
DVTPlugInDYLDErrorMessageErrorKey=dlopen(/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration,
0): Library not loaded:
/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator\n
Referenced from:
/Applications/Xcode-beta.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit\n
Reason: image not found, NSLocalizedDescription=Loading a plug-in
failed.,
NSFilePath=/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework,
NSLocalizedFailureReason=The plug-in
\U201ccom.apple.dt.IDE.IDEInterfaceBuilderCocoaTouchIntegration\U201d
at path
\U201c/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework\U201d
could not be loaded. The plug-in or one of its prerequisite plug-ins
may be missing or damaged., NSUnderlyingError=0x7fc8df3cb340 {Error
Domain=NSCocoaErrorDomain Code=3587
\"dlopen_preflight(/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration):
Library not loaded:
/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator\n
Referenced from:
/Applications/Xcode-beta.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit\n
Reason: image not found\" UserInfo={NSLocalizedFailureReason=The
bundle is damaged or missing necessary resources.,
NSLocalizedRecoverySuggestion=Try reinstalling the bundle.,
NSFilePath=/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration,
NSDebugDescription=dlopen_preflight(/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration):
Library not loaded:
/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator\n
Referenced from:
/Applications/Xcode-beta.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit\n
Reason: image not found,
NSBundlePath=/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework,
NSLocalizedDescription=The bundle
\U201cIDEInterfaceBuilderCocoaTouchIntegration\U201d couldn\U2019t be
loaded because it is damaged or missing necessary resources.}}}"; }
I had the same issue. I have reinstalled XcodeSystemResources.pkg package. You will find it in here:
/Applications/Xcode.app/Contents/Resources/Packages/XcodeSys‌​temResources.pkg
The installer will recreate /Library/Developer/PrivateFrameworks folder with its content. After that Xcode 9 started working for me.

Rikulo-Stream crashes daily with -"SocketException: OS Error: Broken pipe, errno = 32"

I have a simple web app (http://www.webdungeon2.org) (6 pages) running on the latest (April 2014) version of Rikulo Stream (Ubuntu 13.04), Dart 1.2 and I get the following error when browsing (i think):
Uncaught Error: SocketException: OS Error: Broken pipe, errno = 32, address = 0.0.0.0, port = 80
Unhandled exception:
SocketException: OS Error: Broken pipe, errno = 32, address = 0.0.0.0, port = 80
#0 _rootHandleUncaughtError.<anonymous closure>.<anonymous closure> (dart:async/zone.dart:700)
#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:23)
#2 _asyncRunCallback (dart:async/schedule_microtask.dart:32)
#3 _asyncRunCallback (dart:async/schedule_microtask.dart:36)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:119)
The server crashes and then I restart it. This has happened 3 times in 3 days.
I also get these (which do NOT crash the site):
2014-04-09 15:07:33.394:stream:5
SHOUT: [/MY_WEB_PAGE] HttpException: Trying to set 'Transfer-Encoding: Chunked' on HTTP 1.0 headers
#0 _HttpHeaders.chunkedTransferEncoding= (http_headers.dart:142)
#1 Rsp.init (package:stream/src/rsp_util.dart:25:15)
#2 demo (file:///mytool/webdungeon/web/webapp/demo.rsp.dart:10:16)
#3 _StreamServer._handle (package:stream/src/server_impl.dart:92:39)
#4 _StreamServer._startChannel.<anonymous closure>.<anonymous closure> (package:stream/src/server_impl.dart:310:16)
#5 _rootRunUnary (dart:async/zone.dart:717)
#6 _ZoneDelegate.runUnary (dart:async/zone.dart:449)
#7 _CustomizedZone.runUnary (dart:async/zone.dart:654)
#8 _BaseZone.runUnaryGuarded (dart:async/zone.dart:569)
......
......
Any suggestions?
UPDATE - 12 April
Problem still occurs on Dart 1.3, but error code is different
Uncaught Error: SocketException: OS Error: Connection reset by peer, errno = 104, address = 0.0.0.0, port = 80
Unhandled exception:
SocketException: OS Error: Connection reset by peer, errno = 104, address = 0.0.0.0, port = 80
#0 _rootHandleUncaughtError.<anonymous closure>.<anonymous closure> (dart:async/zone.dart:713)
#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:23)
#2 _asyncRunCallback (dart:async/schedule_microtask.dart:32)
#3 _asyncRunCallback (dart:async/schedule_microtask.dart:36)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:119)
Serge
UPDATE - 28 April
The problem seems to have been resolved in Dart SDK version 1.3.3. My server has been running for 2 days without a hitch.
Serge
Did you upgrade to Dart 1.3? The problem shall be caused by Issue 17468, and it was fixed in Dart 1.3.
For the issue of HttpException...Chunked, I don't have the experience of it. You have to check Dart API, or make a simple case to reproduce the issue.
The fix for issue 17468 contained a bug. Streams belongs to the zone where they are listened to, not created. I've fixed this mistake with r35071.
While this will not fix the 1.3 binary, it should be possible to check out the 1.3 source and apply this patch.

Resources