Offline Error SerialException

What is the problem?
This problem only occurs when "Allow [Cross Origin Resource Sharing]" is enabled. If I turn it off everything works just fine.

When I start octoprint and it tries to connect I always get this error:
State: Offline (Error: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2739)

The problem is always solved by pulling out the usb-cable and then putting it back in. Once this is done there are no problems at all untill I turn the printer off and turn it back on the next time.

What did you already try to solve it?
Turned Allow [Cross Origin Resource Sharing] off; but since I want to connect to my printer using CORS it fells like a bad solution.

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)
I'm using standard Creality-Ender 3 software (and hardware)
Octoprint on a Raspberry Pi; version 1.3.11
The raspberry pi is fed power from the Ender-3 power-supply. No warnings of low power etc are shown (and power is is measured to about 5.01 Volt)

got logs?

Changing monitoring state from "Offline" to "Detecting serial port"
Serial port list: ['/dev/ttyUSB0']
Connecting to: /dev/ttyUSB0
Changing monitoring state from "Detecting serial port" to "Opening serial port"
Connected to: Serial<id=0x6f42dd30, open=True>(port='/dev/ttyUSB0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
Starting baud rate detection...
Changing monitoring state from "Opening serial port" to "Detecting baudrate"
Trying baudrate: 115200
Send: N0 M110 N0*125
Recv: k
Baudrate test retry #1
Send: N0 M110 N0*125
Unexpected error while reading serial port, please consult octoprint.log for details: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2739
Please see https://faq.octoprint.org/serialerror for possible reasons of this.
Changing monitoring state from "Detecting baudrate" to "Offline (Error: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2739)"
Connection closed, closing down monitor
Changing monitoring state from "Offline" to "Detecting serial port"
Serial port list: ['/dev/ttyUSB1']
Connecting to: /dev/ttyUSB1
Changing monitoring state from "Detecting serial port" to "Opening serial port"
Connected to: Serial<id=0x722d8790, open=True>(port='/dev/ttyUSB1', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
Starting baud rate detection...
Changing monitoring state from "Opening serial port" to "Detecting baudrate"
Trying baudrate: 115200
Send: N0 M110 N0*125
Recv: start
Changing monitoring state from "Detecting baudrate" to "Operational"
Recv: echo: External Reset
Recv: Marlin 1.0.0
Send: N0 M110 N0*125
Recv: echo: Last Updated: Sep  3 2018 19:03:20 | Author: (Ender-3 Pro)
Recv: Compiled: Sep  3 2018
Recv: echo: Free Memory: 9679  PlannerBufferBytes: 1232
Recv: echo:Hardcoded Default Settings Loaded
Recv: echo:SD init fail
Recv: echo:SD init fail
Recv: ok
Recv: ok
Send: N1 M115*39
Send: N2 M21*18
Recv: FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:http://www.mendel-parts.com PROTOCOL_VERSION:1.0 MACHINE_TYPE:www.creality3d.cn EXTRUDER_COUNT:1 UUID:00000000-0000-0000-0000-000000000000
Recv: ok
Send: M105
Recv: echo:SD init fail
Recv: echo:SD init fail
Recv: ok
Recv: ok T:23.1 /0.0 B:22.6 /0.0 T0:23.1 /0.0 @:0 B@:0
Send: M105
Recv: ok T:23.1 /0.0 B:22.7 /0.0 T0:23.1 /0.0 @:0 B@:0
Send: M105
Recv: ok T:23.0 /0.0 B:22.7 /0.0 T0:23.0 /0.0 @:0 B@:0
Send: M105
Recv: ok T:23.1 /0.0 B:22.7 /0.0 T0:23.1 /0.0 @:0 B@:0
Send: M105
Recv: ok T:23.1 /0.0 B:22.7 /0.0 T0:23.1 /0.0 @:0 B@:0
Send: M105
Recv: ok T:23.1 /0.0 B:22.8 /0.0 T0:23.1 /0.0 @:0 B@:0
Send: M105
Recv: ok T:23.1 /0.0 B:22.7 /0.0 T0:23.1 /0.0 @:0 B@:0
Send: M105
Recv: ok T:23.1 /0.0 B:22.9 /0.0 T0:23.1 /0.0 @:0 B@:0
Send: M105
Recv: ok T:23.0 /0.0 B:22.8 /0.0 T0:23.0 /0.0 @:0 B@:0

From that log, I see OctoPrint trying two ports, /dev/ttyUSB0 and /dev/ttyUSB1 and it looks like the printer is connected to /dev/ttyUSB1. There appears to be a device connected to /dev/ttyUSB0 which is confusing OctoPrint. If you go to Settings, Serial Connection on OctoPrint, take a screenshot of that and post it here.

I do have a usb-wifi dongle attached to the raspberry, can't see why that would mess with things though.

@foosel would have to answer why OctoPrint is confused by the WiFi dongle.

I wonder if swapping the port for the dongle with the port for the printer will make OctoPrint happier. Otherwise, you could change the Serial Port dropdown from AUTO to the port the printer is actually on (/dev/ttyUSB1).

A Raspberry Pi 3B without wifi? Never heard of it.

The original Raspberry Pi's 700Mhz was single-core. It wasn't until the "2" series that quad-cores were brought in.

Personally, I'd suggest that you need to jump ahead and get a 3B or 3B+ for this.

I don't think @Cristopher_Dahlstrom ever said what model RPi he had.

That's what he indicated, as combined with having to use a wifi dongle in order to get some connectivity. That to me sounds like an earlier Raspi. Admittedly, I'm guessing but it's not a bad guess.