Comments (8)
I'm not part of the project, but I fixed this myself from switching from node version 14 to 12.
from core.
I ran into this problem a couple of days ago, and think I've got to the bottom of it...
Short version: the use of .hasOwnProperty("readable")
(and similarly for "writable"
) in vfs-socket/consumer.js and vfs-socket/worker.js are over-strict; as of Node 14, these properties are getters on the prototypes of Readable
and Writable
. This means that e.g. an IncomingMessage
is no longer recognized by c9 as being readable, so that property is not set on the created token. Replacing those .hasOwnProperty()
calls on the various stream
and token
variables in those files with a simple in
operator check appears to fix this.
Longer version: If you compare the last v13 version of stream.Readable
with the first v14 version, you'll see the readable flag is no longer set in the constructor, but defined as a getter/setter; the equivalent is done on Writable
, which in turn necessitates some handling of it in Duplex
. For whatever reason (The fake-multiple-inheritance trick of overriding this[Symbol.hasInstance]()
not being available in Node at the time? A deliberate decision to prefer composition over inheritance?), both the the streams stored and created in vfs-socket are tested for their supported behaviour via values of flags rather than types. There are a bunch of places in c9 where a Stream
is directly instantiated and readable
/writable
flags set on it, rather than creating a Readable
etc.
Thing I'm not sure about: What was the motivation for insisting that these flags had to be own properties at the time, and does allowing inherited properties as well break it? It seems odd that the code in storeStream()
will happily check the value of stream.readable
and only later check if readable
is an own property or not. Perhaps this was a valid concern for the Stream API in the version of Node it was originally written against, but may not apply anymore?
from core.
@drmrbrewer As I mentioned above, you need to update the mentioned vfs-socket files to replace stream.hasOwnProperty( "readable")
with ("readable" in stream)
, and likewise for "writable"
. Maybe do the same for the various token variables too.
from core.
I have the same problem. I already auth the complete folder structure of .c9, c9sdk and the workspace but nothing works. I can't save files in the web editor. Does anyone has a solution for it?
from core.
@aglennquicket's answer fixed this issue for me! here's the concrete steps I took:
- quit c9
- use nvm to downgrade from node 14 to 12:
nvm install 12
- restart c9
voíla!
from core.
@jxmorris12 @aglennquicket Any way of solving this without having to downgrade from node 14 to 12? Eventually this solution will no longer work.
from core.
Have you considered installing Node 12 in a custom directory and starting Cloud9 using that, while upgrading the global Node installation to whichever version you prefer?
from core.
@john-perks do you know what the solution is?
from core.
Related Issues (20)
- Self hosted --collab share error
- Failed to install SDK in Mac OS 10.14.3 HOT 1
- Error creating TMUX session: Cannot read property 'on' of undefined HOT 3
- hide toolbar
- Full Java support?
- Is this project dead? HOT 9
- no more update? HOT 2
- Vulnerabilities
- Can i integrate cloud9 ace editor separately
- Fresh install - git extension not working
- List of flags HOT 2
- Connect to the IDE from a subdomain? HOT 2
- Require password to access Theia in browser?
- connect to SSH workspace from self hosted c9 SDK
- Error: Cannot find module 'c9/urls'
- Python 2 out of support. HOT 1
- How to delete cloud9?
- C9 Sudden stop,
- download and parse revision history
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from core.