Os error read only file system errno 30 flutter

Just following along the "tutorial" setup, and this happens. Code void initDb() async { store = StoreRef.main(); db = await databaseFactoryIo.openDatabase(dbPath, version: 1); } Result E/...

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


Closed

egorikem opened this issue

Jul 28, 2019

· 2 comments

Comments

@egorikem

Just following along the «tutorial» setup, and this happens.

Code

void initDb() async {
    store = StoreRef.main();
    db = await databaseFactoryIo.openDatabase(dbPath, version: 1);
}

Result

E/flutter (25210): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: FileSystemException: Cannot create file, path = '/sample.db' (OS Error: Read-only file system, errno = 30)
E/flutter (25210): #0      _wrap.<anonymous closure> (package:sembast/src/io/file_system_io.dart:102:7)
E/flutter (25210): #1      _rootRunUnary (dart:async/zone.dart:1132:38)
E/flutter (25210): #2      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
E/flutter (25210): #3      _FutureListener.handleError (dart:async/future_impl.dart:144:20)
E/flutter (25210): #4      Future._propagateToListeners.handleError (dart:async/future_impl.dart:651:47)
E/flutter (25210): #5      Future._propagateToListeners (dart:async/future_impl.dart:672:24)
E/flutter (25210): #6      Future._completeWithValue (dart:async/future_impl.dart:483:5)
E/flutter (25210): #7      Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:513:7)
E/flutter (25210): #8      _rootRun (dart:async/zone.dart:1124:13)
E/flutter (25210): #9      _CustomZone.run (dart:async/zone.dart:1021:19)
E/flutter (25210): #10     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
E/flutter (25210): #11     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
E/flutter (25210): #12     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
E/flutter (25210): #13     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)

Manifest

Manifest looks ok to me:

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

@egorikem
egorikem

changed the title
OS Error: Read-only file system, errno = 30

OS Error: Read-only file system, errno = 30

Jul 28, 2019

@egorikem

Ok then, the solution has been found. However I do believe that the missing line absolutely shall be added to the tutorial

store = StoreRef.main();
final appDocDir = await getApplicationDocumentsDirectory();
db = await databaseFactoryIo.openDatabase(join(appDocDir.path, dbPath), version: 1);

@alextekartik

2 participants

@alextekartik

@egorikem

[Solved] FileSystemException: Creation failed, path = ‘Directory: » (OS Error: Read-only file system, errno = 30)

Question

Asked by tr1via on June 11, 2022 (source).

I am receiving an error as Unhandled Exception: FileSystemException: Creation failed, path = 'Directory: '' (OS Error: Read-only file system, errno = 30) when I am trying to save a xlsx file.

Code:

class ExportPasswords {
  static exportUserEntries(List entries) async {
    final _psd = PasswordDecrypter();
    final _secureStorage = FlutterSecureStorage();

    //creating the xlsx
    var excel = Excel.createExcel();
    var fileBytes = excel.save();

    Sheet sheetObject = excel['pssswd_export'];
    CellStyle cellStyle = CellStyle(
        backgroundColorHex: "#1AFF1A",
        fontFamily: getFontFamily(FontFamily.Calibri));
    cellStyle.underline = Underline.Single;

    for (var entry in entries) {
      final _username = entry['data']['username'];
      final _name = entry['data']['name'];
      final _url = entry['data']['url'];
      final _hashedPassword = entry['data']['password'];
      final _randForKeyToStore = entry['data']['randForKeyToStore'];
      final _randForIV = entry['data']['randForIV'];
      final _masterPassword = await _secureStorage.read(key: 'masterPassword');

      final _decryptedEntryPassword = await _psd.getDecryptedPassword(
          _hashedPassword, _randForKeyToStore, _randForIV, _masterPassword);

      sheetObject.appendRow([_name, _username, _decryptedEntryPassword, _url]);
    }
    PermissionStatus permissionResult =
        await SimplePermissions.requestPermission(
            Permission.WriteExternalStorage);
    if (permissionResult == PermissionStatus.authorized) {
      Directory directory = await getApplicationDocumentsDirectory();
      // print(directory);
      new Directory(directory.path + '/').create(recursive: true).then((dir) {
        print(dir);
        File(join('$dir/pssswd_export'))
          ..createSync(recursive: true)
          ..writeAsBytesSync(fileBytes!);
      });
    }
  }
}

I have given the permission of WRITE_EXTERNAL_STORAGE.

I/SimplePermission( 7685): Requesting permission : android.permission.WRITE_EXTERNAL_STORAGE
I/SimplePermission( 7685): Requesting permission status : 3

In the error it is displayed as Directory : '', but when I am printing the directory value it is showing the path

I/flutter ( 7685): Directory: '/data/user/0/com.palsoham.pssswd.pssswd/app_flutter/'

Answer

Question answered by Shahzad U (source).

Please try changing your path in File function from '$dir/pssswd_export' to dir.path + /pssswd_export'.

  • Source: Stackoverflow.com

Содержание

  1. OSError: [Errno 30] Read-only file system #209
  2. Comments
  3. Tips To Fix Oserror Errno 30 Read-only Virtualbox Filesystem
  4. PC running slow?
  5. PC running slow?
  6. (OS Error: Read-only file system, errno = 30) #202
  7. Comments
  8. Footer
  9. How to solve [Errno 30] Read-only file system
  10. 1 Answer 1
  11. Enabling read-write mode

OSError: [Errno 30] Read-only file system #209

I’ve started getting a strange error when trying to create new environments:

I don’t seem to have trouble creating symlinks under any other circumstances.

I’m running Ubuntu 11.04 through Virtualbox — I’ve tried destroying and rebuilding the box from scratch (using an unchanged puppet manifest), but the same error persists.

The text was updated successfully, but these errors were encountered:

I’m afraid there’s not much I can do here, as I’m not able to reproduce the failure. I don’t know why you’d get a read-only filesystem error unless the filesystem you’re trying to create the virtualenv on is in fact read-only.

This code has changed in the development version of virtualenv, so you could try with virtualenv==dev and see if that helps.

I’m also having this problem on Ubuntu 11.04 on Virtualbox. @rlayte if you figured out how to solve this, I’d love to know how.

I’m pretty sure this is a virtualbox issue now so should probably be raised with them if you want a real solution to it.

I ‘solved’ it by moving the .virtualenvs directory into a non-shared folder as the problem only exists on folders shared with os x.

I ultimately decided to move away from virtualbox due to this kind of instability.

I ended up giving the shared folder group write permissions in OSX, then remounted it in Ubuntu, and it seemed to solve the problem.

Yikes, ran into this issue just now, but I think it’s a VirtualBox bug: https://www.virtualbox.org/ticket/10085#comment:12

Basically symlinks don’t work in shared folders anymore for security reasons.

This can be solved on virtualbox when the issues are created by shared folders by running:

This won’t store your environment in your folder, but best practice is to use requirements.txt and tell your VCS to ignore your environment tree

Update: Of course, a good night’s sleep makes everything clearer. Installing python-dev as sudo changed permissions in some Python files that caused the virtualenv command to fail, but I can just run that as sudo and it works.

I’m seeing this same error. If I create a fresh VM from the base lucid32 box and then execute the following commands:

  • sudo apt-get install python-pip
  • sudo pip install virtualenv
  • cd /vagrant/
  • virtualenv test0
  • sudo apt-get install python-dev
  • virtualenv test1

Then the first virtualenv will be created successfully, but the second will fail with the above [Errno 30] Read-only file system . I’ve posted the full output of this process here: https://gist.github.com/3346994. (I need python-dev for mysql-python.)

Does anyone know how I might fix/work around this? I’d strongly prefer to keep using shared folders, and this seems different than the issue with VirtualBox. Thanks, and let me know if I can provide any more information!

sudo pip install virtualenv==dev did the trick for me. I’m on OS X Lion host and Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-23-generic x86_64) as guest.

I noticed this again when I tried to set up a fresh VM, and it seems that a change between virtualenv 1.8.2 and 1.8.3 caused that error to come back:

I can use 1.8.2 for now, but thought I’d mention here. Thanks!

@lehrblogger Could you run strace -f virtualenv test , to pinpoint which paths are causing the error?

@brentsmyth The relevant bit isn’t there. Use a pastebin or a gist.

much better idea.

The problem lies in virtualbox though. You can find some work around options in these links.

@g2p !! Sorry it took me so long to get to this, I was travelling and must have missed the email.

I’m running Mac OS X 10.8.2 and just upgraded to the latest versions of VirtualBox (4.2.4) and Vagrant (1.0.5). I’m happy to provide more info if it’d be helpful, and I promise I’ll respond more quickly 🙂

(It’s fine if I have to use one of the VirtualBox workarounds, but the weird thing is that it works with virtualenv 1.8.2 and not 1.8.4 – see the end of my gist.)

I ran into the same issue. Using VBoxManage setextradata as proposed in https://www.virtualbox.org/ticket/10085 worked for me. But this is another little thing that makes the process of running a virtual local dev server unnecessary cumbersome 🙂

I’ve been able to get VBoxManage setextradata to work for me too (with virtualenv 1.8.4) by using «v-root» as my «SHARE_NAME» in my Vagranfile, as suggested in this comment. Thanks everyone for the info/suggestions!

My steps to fix it:

  1. Use virtualenv==1.8.2 (not working with 1.8.4!)
  2. setextradata in host OS:

, where CENTOS — Virtualbox OS name, /home/oe — name of mounted folder
3. Mount device in guest OS with read-write permissions:

, where uid=1000 — uid of current user in guest OS (see /etc/passwd).

upgrade virtualenv to the latest version(1.11.6), and use it as

the options will not use hard link but copy the files

The solution link is:

I got this error on a shared directory from the vm host. When I switched to a directory that isn’t shared, it was fine.

@socrateslee Thanks mate. You saved me a lot of hassle!

the reason is you tried to start the virtualenv in a shared folder

OSError: [Errno 30] Read-only file system
if you have using shared drive inside vm and trying to execute tox inside that directory it will throw this error. Simple solution is copy that source code inside some directory in vm, lets say inside your home directory /home/sunil/projectName/ . and execute tox command inside this directory.

Источник

Tips To Fix Oserror Errno 30 Read-only Virtualbox Filesystem

Table of Contents

PC running slow?

You may have encountered an error code indicating that oserror errno 30 is a read-only virtual file system box. There are several ways to solve this problem, which we will talk about shortly.

Yes. Mister. I am trying to install Linux Oracle 5.10 (64 bit) on my virtual box, but unfortunately I have this error. I am sending from the virtual mailbox 4.3.12.r93733

An exception has been handled
another has occurred. This is probably a new bug
. Please keep a copy I would say a verbose exception and report a bug
report anaconda to the reporting tool
provided by your distribution

File “/usr/lib/anaconda/yuminstall.py”, line 143, in callback
self.instLog.flush ()
IOError: [Errno 30] Read-only file system

PC running slow?

ASR Pro is the ultimate solution for your PC repair needs! Not only does it swiftly and safely diagnose and repair various Windows issues, but it also increases system performance, optimizes memory, improves security and fine tunes your PC for maximum reliability. So why wait? Get started today!

I am trying to work on a Django build project using Virtualbox. The project directory is a special symbolic link that points to the shared folder that is locatedThey run on the host computer. Django project is created without permission, I am successfully hosting a site with Apache on the guest machine. However, when I run Collectstatic, I get OSError: [Errno 30] Read-only file system .

Is there another customer that I can add to the entire vboxsf group? My user is Banjo and Apache is www-data

Or is there another solution?I just want to have files on my computer.

  • Host: Xubuntu 12.10
  • Guest: Xubuntu 13.04
  • Django: 1.5.1

Here are the relevant parts of my setup steps. I also made it possible for Django Admin. Are these static documents that need to be collected?

This is a tree with the new file system owner and group

I ran sudo chown -R banjo prod / but did not change the owner.

I got rid of a lot of information and so on, but I still get the following error code and don’t know where to go:

Here are some details. Let me know if you need anything more relevant:

  • For Windows 10.
  • Almost all four py files (main.py) are created in Python 2.7.9.
  • Everything is integrated into PyCharm.
  • Use the manually downloaded Miniconda2 as your interpreter.
  • Miniconda2 as well as all other files uploaded to C: Users Me Miniconda2 …
  • This is evidenced by loaded Kivy and other non-integrated Windows modules.
  • Using the Kivy Buildozer virtual machine on the Oracle VirtualBox.Error virtual machine
  • was first allowed on every sudo install of i386 items from each of our / media / sf_PyProjects / IdiomasApp / folders.
  • I edited my buildozer.spec to “log_level = 2” file.
  • After this error, creation is still not possible. The documentation will probably be below:

Do I have to share multiple files defined in bidirectional mode for VirtualBox to come back for this thing to work properly? This is the best guess, but I’m really not at ease outside of my Windows / Python bubble.

I am building Ubuntu 17.10 and am trying to create a single virtual Python environment (named “my_virtualenv”) in my VBOX shared folder with the idea of ​​using this Python interpreter in the pycharm of a small windows host to invest in. … (Just to see if this is possible)

General The folder is working fine, I will definitely create / modify the host and guest files. read-only “).

When I run virtualenv my_virtualenv , even after a few seconds I get the following virtualenv:

As you can see, I tried unsuccessfully to run most of the commands as root. I think many of us have something to do with reading and writing, but I don’t know how to do it.

Источник

(OS Error: Read-only file system, errno = 30) #202

I keep seeing this error when trying to write to my DB. I have seen in the past in an old issue but it’s reappeared. I’m currently trying to write to a DB but hit the issue of (OS Error: Read-only file system, errno = 30). Any idea why?

My Sembast DB:-

Flutter Doctor (Im using AS)

My error output (You can see the print statement outputting something that looks like it has worked just before returning the created DB in my code snippet)

Any ideas what is going on? I’m a little lost on this one. Thanks in advance!

The text was updated successfully, but these errors were encountered:

Indeed it is weird as it seems to try to access a root file (‘/bc_repository.db’ which is indeed readonly on most platforms) and it seems to fail after opening the database (or maybe it is failing due to a second call to _db)

For safety, I would ensure that _db is called only once (using a lock or future, here there is an edge case where the database can be opened twice) — add a temp print (with the path) before opening the database for verification.

I’m not sure on which platform you are running the app though (Android? Linux?)

I am using Android in this instance. I will try using a lock now and come back to you shortly. Thanks for the quick response.

Yes, it does look like the path is printed, and I’m assuming the actual file is being created. As you mentioned, I think this might be a concurrent modification issue. Is there any functions I can use to assess wether my db is open already? I currently use a generic db read/write class that multiple repositories extend depending on the child object. Because of this I sometimes have more than one item being saved concurrently. Ideally, I wouldn’t need to create a singleton DB, I should be able to check for the db being open and return when it’s ready to be used.

One quick way to prevent _db to be called twice is to declare it this way:

And no there is no isOpened method, sorry (and anyway it is not alway safe and database object only exists when opened).

The path /data/user/0/com.purewowstudio.bodycal_new/app_flutter/ looks weird for android where it typically starts with /data/data/

but I could be wrong on that.

I’ll give that a go, but again I’m assuming if I have multiple repositories using this database, I would essentially need to create a singleton to store the instance of this DB. I suppose it should still work.

Thakns for your help.

Yes a singleton is a reasonable solution!

All sorted! Thanks for your help.

I have a generic database class that I extend for every object that is persistable, which all point to the same DB instance stored in a singleton. It seems to have solved my problem.

Thank you very much for your help!

© 2023 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

How to solve [Errno 30] Read-only file system

I’m new to this forum, and this is my first question:

I bought the meizu MX4 ubuntu edition today. I would like to install Ubuntu SDK. I tried to follow this walkthrough:

Upon giving the following line in the terminal:

I get the following:

I run ubuntu 15.04 (OTA-8.5) in developer mode. I’m kind of stuck now. Can anyone help me out?

1 Answer 1

I found out what to do.

I followed https://developer.ubuntu.com/en/start/ubuntu-for-devices/installing-ubuntu-for-devices/ (archived) and skipped the actual installation. There is a part Enabling read-write mode which fixed this problem. It says:

Enabling read-write mode

By default the system is read-only. You can switch to read-write mode, although this disables Ubuntu system upgrades. The main purpose for this is developing the Ubuntu system directly. This is not required for developing apps or using the system normally. Recovering from read-write mode is possible but requires reinstalling the system from scratch.

Warning: Switching a device to read-write mode (and/or recovering from it) is an advanced feature and may result in complete data loss.

It also disables automatic over-the-air delta updates. Accepting a full over-the-air update after making a device writable may undo changes you have made.

The system reboots in read-write mode.

Источник

Понравилась статья? Поделить с друзьями:
  • Os error 5 elementary os
  • Os error 4294956486 что делать
  • Os error 4294956471
  • Os error 4294956470 steam
  • Os environ python error