Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error MissingPlatformDirectoryException when running flutter gallery #353

Closed
yaliv opened this issue Aug 26, 2023 · 3 comments
Closed

Error MissingPlatformDirectoryException when running flutter gallery #353

yaliv opened this issue Aug 26, 2023 · 3 comments

Comments

@yaliv
Copy link

yaliv commented Aug 26, 2023

I got this error when running flutter gallery with flutter-pi:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPlatformDirectoryException(Unable to get application documents directory)
#0      GetStorage._init (package:get_storage/src/storage_impl.dart:49)
<asynchronous suspension>
#1      new GetStorage._internal.<anonymous closure> (package:get_storage/src/storage_impl.dart:30)
<asynchronous suspension>
#2      main (package:gallery/main.dart:29)
<asynchronous suspension>

just stuck on that output.


Specifications

Development machine:

  • Flutter SDK version: 3.10.6
  • Build method: flutterpi_tool

Raspberry Pi:

  • Hardware: Pi 3 Model B v1.2
  • OS: 2023-05-03-raspios-bullseye-arm64-lite

Executed Commands

Development machine:

flutter pub get
flutter run        # the gallery app runs fine
flutterpi_tool build --arch=arm64 --cpu=pi3 --release
rsync -a --info=progress2 ./build/flutter_assets/ [email protected]:/home/pi/flutter_gallery

Raspberry Pi:

flutter-pi --release ~/flutter_gallery
# or
flutter-pi --release /home/pi/flutter_gallery

I always got the same error, both in debug mode and release mode.

@chochstedler
Copy link

Seeing the same issue

@pieter-scholtz
Copy link
Collaborator

flutter/gallery#979

@ardera
Copy link
Owner

ardera commented Oct 12, 2023

You need to install xdg-user-dirs: sudo apt-get install xdg-user-dirs

It's mentioned in the readme now with #352 .

@ardera ardera closed this as completed Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants