Select the root folder of your device. This is typically the CIRCUITPY Drive on your computer unless you renamed it. If your device does not appear as a drive on your computer, it will need to have the USB Host functionality enabled.
-OSError: [Errno 5] after Ctrl+D? Click for fix.Your CIRCUITPY drive is mounted with asynchronous writes. Remount it with sync:
udisksctl unmount -b /dev/sdX1
-udisksctl mount -b /dev/sdX1 -o sync
- Replace sdX1 with the correct device. Find it with:
lsblk
- or:
-mount | grep CIRCUITPY
- For a permanent fix, see Linux USB mount notes.
-diff --git a/js/common/utilities.js b/js/common/utilities.js index bb2c684..4ad4824 100644 --- a/js/common/utilities.js +++ b/js/common/utilities.js @@ -75,26 +75,6 @@ function isChromeOs() { return false; } -// Test to see if browser is running on Linux (and is not Chrome OS or -// Android, which can also report "Linux" in the legacy userAgent string). -function isLinux() { - // Newer test on Chromium - if (navigator.userAgentData?.platform === "Linux") { - return true; - } - // Avoid false positives for Chrome OS and Android. - if (isChromeOs()) { - return false; - } - if (navigator.userAgent.includes("Android")) { - return false; - } - if (navigator.userAgent.includes("Linux")) { - return true; - } - return false; -} - // Parse out the url parameters from the current url function getUrlParams() { // This should look for and validate very specific values @@ -187,7 +167,6 @@ export { isLocal, isMicrosoftWindows, isChromeOs, - isLinux, getUrlParams, getUrlParam, timeout, diff --git a/js/workflows/usb.js b/js/workflows/usb.js index 9aa754d..e5e2e10 100644 --- a/js/workflows/usb.js +++ b/js/workflows/usb.js @@ -4,7 +4,7 @@ import {GenericModal, DeviceInfoModal} from '../common/dialogs.js'; import {FileOps} from '@adafruit/circuitpython-repl-js'; // Use this to determine which FileTransferClient to load import {FileTransferClient as ReplFileTransferClient} from '../common/repl-file-transfer.js'; import {FileTransferClient as FSAPIFileTransferClient} from '../common/fsapi-file-transfer.js'; -import { isChromeOs, isLinux, isMicrosoftWindows } from '../common/utilities.js'; +import { isChromeOs, isMicrosoftWindows } from '../common/utilities.js'; let btnRequestSerialDevice, btnSelectHostFolder, btnUseHostFolder, lblWorkingfolder; @@ -211,16 +211,6 @@ class USBWorkflow extends Workflow { btnUseHostFolder = modal.querySelector('#useHostFolder'); lblWorkingfolder = modal.querySelector('#workingFolder'); - // Show the Linux-only mount-option notice when relevant (#229). - // CIRCUITPY mounted without `sync` on Linux can produce - // "OSError: [Errno 5] Input/output error" on Ctrl-D after a save - // because Chromium's File System Access writes are deferred by the - // kernel writeback for up to ~30s. - const linuxNotice = modal.querySelector('#linux-mount-notice'); - if (linuxNotice) { - linuxNotice.hidden = !isLinux(); - } - // Map the button states to the buttons this.connectButtons = { request: btnRequestSerialDevice, diff --git a/sass/layout/_layout.scss b/sass/layout/_layout.scss index 7bbe637..6ab229f 100644 --- a/sass/layout/_layout.scss +++ b/sass/layout/_layout.scss @@ -542,70 +542,3 @@ } } - -// Inline notice shown in the USB connect dialog for Linux users (#229). -.linux-mount-notice { - margin-top: 1rem; - padding: 0.5rem 1rem; - border-left: 4px solid #f0ad4e; - background-color: #fff8e1; - border-radius: 3px; - font-size: 0.95em; - - summary { - cursor: pointer; - padding: 0.25rem 0; - list-style: none; - position: relative; - padding-left: 1.25rem; - - &::-webkit-details-marker { - display: none; - } - - &::before { - content: "\25B6"; // right-pointing triangle - position: absolute; - left: 0; - font-size: 0.8em; - transition: transform 150ms ease-in-out; - display: inline-block; - } - } - - &[open] summary { - margin-bottom: 0.5rem; - - &::before { - transform: rotate(90deg); - } - } - - p { - margin: 0.25rem 0; - } - - pre { - margin: 0.5rem 0; - padding: 0.5rem; - background-color: #2d2d2d; - color: #f1f1f1; - border-radius: 3px; - overflow-x: auto; - font-size: 0.9em; - } - - code { - font-family: monospace; - } - - kbd { - display: inline-block; - padding: 1px 4px; - font-family: monospace; - font-size: 0.9em; - background-color: #eee; - border: 1px solid #ccc; - border-radius: 3px; - } -}