hwclass / ziya

:pencil2: Your local in-browser editor
MIT License
62 stars 2 forks source link

Fails to run on Windows 10 #56

Open asarialtun opened 7 years ago

asarialtun commented 7 years ago

Version Number

1.1.8

Test Case

Installing and running on Windows 10 (built 1607) with node v0.12.2 and npm v2.7.4

Steps to Reproduce

  1. Used following command to install C:\> npm install ziya
  2. In command prompt, type the app name to run C:\>ziya

Expected Behavior

Expected to run on Windows 10

Actual Behavior

Crashes with the error displayed below, without further information about a solution or workaround.

C:\Users[removed_for_privacy]\AppData\Roaming\npm\node_modules\ziya\src\server\index.js:25 app.get('/files/:path', (req, res) => { ^^ SyntaxError: Unexpected token => at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.Module.runMain (module.js:501:10) at startup (node.js:129:16) at node.js:814:3

hwclass commented 7 years ago

Hi @asarialtun

Can you please specify your local node and npm versions?

Thanks

Baris

altaywtf commented 7 years ago

I guess its lower than v6. @hwclass maybe we should add supported node versions into readme or transpile server side code to ES5.

asarialtun commented 7 years ago

@hwclass

Installed latest version (node: 6.9.4 and npm: 3.10.10) on another computer. The app launches (it will still crash for some other reasons, I will report it seperately).

I'll feedback with the failing environment's information shortly.

hwclass commented 7 years ago

Thanks @asarialtun, waiting for the comparative results.

asarialtun commented 7 years ago

@hwclass @altayaydemir It looks node and npm on that PC is outdated by much, node v0.12.2 and npm v2.7.4

altaywtf commented 7 years ago

Hmm, did you update it? If so, did ziya work properly for you?

asarialtun commented 7 years ago

@altayaydemir Yes, I updated the versions of node and npm on my PC and Ziya can launch, can view some files.

Ziya crashed twice: once when I tried to view contents of some (probably unspoorted) files

ziya is now working on port 5000 ...

<--- Last few GCs --->

109867 ms: Scavenge 626.9 (653.1) -> 611.2 (653.1) MB, 0.3 / 0.0 ms [allocation failure]. 110106 ms: Scavenge 635.9 (662.1) -> 620.2 (662.1) MB, 0.2 / 0.0 ms [allocation failure]. 110358 ms: Scavenge 644.9 (671.1) -> 629.2 (671.1) MB, 0.2 / 0.0 ms [allocation failure]. 110584 ms: Scavenge 653.9 (680.1) -> 638.2 (680.1) MB, 0.2 / 0.0 ms [allocation failure]. 110811 ms: Scavenge 662.9 (689.1) -> 647.2 (689.1) MB, 0.2 / 0.0 ms [allocation failure].

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 00000226778CFB61 1: defineProperty(aka defineProperty) [native v8natives.js:~573] [pc=000001637C5C35C2] (this=0000022677804381 ,D=0000017B1CD4A9B1 <JS Array[1721650280]>,R=11184811,v=000000C2C2CBBD59 <an Object with map 0000017E96338029>) 2: DefineIndexedProperty(aka DefineIndexedProperty) [native array.js:~48] [pc=000001637C5D11BE] (this=0000022677804381 ,w=0000017B1CD4A9B1 <JS ...

FATAL ERROR: invalid table size Allocation failed - JavaScript heap out of memory

and second, when I tried to display the contents of my desktop (please note that it happened randomly, when I try again, I can see contents of my desktop folder)

C:\Users[removed]\AppData\Roaming\npm\node_modules\ziya\src\server\utils\getDirectoryContents.js:12 return items.map((item) => { ^

TypeError: Cannot read property 'map' of undefined at getDirectoryContents (C:\Users[removed]\AppData\Roaming\npm\node_modules\ziya\src\server\utils\getDirectoryContents.js:12:15) at fs.readdir (C:\Users[removed]\AppData\Roaming\npm\node_modules\ziya\src\server\index.js:31:21) at FSReqWrap.oncomplete (fs.js:123:15)

hwclass commented 7 years ago

Yeah @asarialtun, I have got that map method error on Windows when I tried. Hope that we have found the exact reason of the crashing browser. The content of the directory sometimes or in exact times, doesn't come from our server instance, so the array cannot be fulfilled and some the method providing traversing among the items, map becomes undefined. Thanks @asarialtun ;)