[bug]: Stacked Cli Unhandled exception from telemetry
Closed this issue · 7 comments
Describe the bug
While running stacked create it throws the below exception.
stacked create view -t web batch
Unhandled exception:
FileSystemException: lock failed, path = '/Users/henriquedn/.config/stacked/telemetry_config.lock' (OS Error: Resource temporarily unavailable, errno = 35)
#0 _checkForErrorResponse (dart:io/common.dart:55:9)
#1 _RandomAccessFile.lock.<anonymous closure> (dart:io/file_impl.dart:1023:7)
<asynchronous suspension>
#2 StorageBackendVm.initialize (package:hive/src/backend/vm/storage_backend_vm.dart:81:5)
<asynchronous suspension>
#3 HiveImpl._openBox (package:hive/src/hive_impl.dart:111:9)
<asynchronous suspension>
#4 HiveImpl.openBox (package:hive/src/hive_impl.dart:142:12)
<asynchronous suspension>
#5 PosthogService.init (package:stacked_cli/src/services/posthog_service.dart:44:12)
<asynchronous suspension>
#6 setupLocator (package:stacked_cli/src/locator.dart:27:3)
<asynchronous suspension>
#7 main (file:///Users/henriquedn/.pub-cache/hosted/pub.dev/stacked_cli-1.12.6/bin/stacked.dart:18:3)
<asynchronous suspension>
To reproduce
Run any of the stacked cli commands in the project
Additional Context
I normally solve it by deleting both the telemetry_config.hive & telemetry_config.lock files.
This works for the terminal session. But for some reason it keeps coming back.
This happens for both when you accept or decline collect ion anonymous usage statistics.
While I have been getting this error for a while now and solving it as above, thought it best to report it and hopefully it can be resolved.
Thank you for this awesome project.
Thanks @Henriquedn we will look into this.
Same issue here
@ferrarafer possible to look into this soon?
Hello @Henriquedn @raphasampaio , hope you are doing well.
Can you please provide me with the permissions of the following resources?
Folder: /Users/henriquedn/.config/stacked
File: /Users/henriquedn/.config/stacked/telemetry_config.lock
You can check them with ls -la
command.
But for some reason it keeps coming back.
The reason is that we need to save in the local storage the decision you made about telemetry, if not is like starting again over and over.
By the way, on my side, I don't see any error, I need to force the error by modifying the file permissions.
Hello @ferrarafer
drwxr-xr-x@ 4 henriquedn staff 128B Feb 22 00:27 stacked
-rw-r--r--@ 1 henriquedn staff 61B Feb 22 00:27 telemetry_config.hive
-rw-r--r--@ 1 henriquedn staff 0B Mar 8 02:00 telemetry_config.lock
@Henriquedn @raphasampaio we released a new version, please update stacked cli
and let me know if you still have problems.
@Henriquedn @raphasampaio we released a new version, please update
stacked cli
and let me know if you still have problems.
I have tested this over the two weeks and the issue seems to be fixed. Thank you very much.