cs50 / ide-issues

1 stars 1 forks source link

Serving folders does not work #45

Closed SNathJr closed 5 years ago

SNathJr commented 5 years ago

What symptom did you see (attaching screenshots as necessary)?

When you right click on a folder and serve it, it does not do anything. May be it is broken?

When date and time (UTC) did the problem happen?

11:06 am Thursday, 19 September 2019 Coordinated Universal Time (UTC)

What steps did you follow to reproduce the problem?

  1. step 1
  2. step 2
  3. step 3

Which web browser did you use (including version number)?

Chrome Latest

Which operating system did you use (including version number)?

Windows 10

Did you log in to CS50 IDE using the same GitHub account you used to create this issue?

Yes

kzidane commented 5 years ago

That should be working. It's possible that your browser is blocking the tab that the IDE is trying to open. Do you see a red x or something on the top-right corner after you click Serve?

SNathJr commented 5 years ago

Hey @kzidane, Thank you for getting back to me.

No, there is nothing like that appearing on the top-right corner.

I also tried running sudo /etc/init.d/apache2 restart, that too did not do anything.

kzidane commented 5 years ago

Do you see any errors in the JS console after you click Serve?

SNathJr commented 5 years ago

There are many errors in the JS console, but it seems these are reconnect attempts:

image

Expanding one of the error I got this:

image

It seems there is some problem with the async connections.

kzidane commented 5 years ago

Is port 8081 blocked on your machine or your network? Do you have any browser extensions?

Kareem

On Thu, Sep 19, 2019 at 8:53 AM Swastik Nath notifications@github.com wrote:

There are many errors in the JS console, but it seems these are reconnect attempts:

[image: image] https://user-images.githubusercontent.com/20180524/65245374-25b0a400-db0a-11e9-8ba2-3a12aaaab7a8.png

Expanding one of the error I got this:

[image: image] https://user-images.githubusercontent.com/20180524/65245427-3a8d3780-db0a-11e9-8310-eed777f826a9.png

It seems there is some problem with the async connections.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cs50/ide-issues/issues/45?email_source=notifications&email_token=ABXFGA5MPYUNWV76QVJOE3TQKNY3LA5CNFSM4IYJWVJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7DLQZI#issuecomment-533117029, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXFGA5UNG5NDC526DSQAWDQKNY3LANCNFSM4IYJWVJA .

SNathJr commented 5 years ago

I do not have any browser extensions. I am not sure if my university has recently started blocking 8081 port. I can retry on my home network and update you on the same.

SNathJr commented 5 years ago

I got a few errors on my home network too:

globalnav-929930bcde398a64c647d525ba8b04477c9a1afa.gz.js:40 Uncaught DOMException: Blocked a frame with origin "https://us-west-2.console.aws.amazon.com" from accessing a cross-origin frame.
    at Object.initialize (https://d3rrzw75sdtfe5.cloudfront.net/js/menu-2kjdfskljflksdfjk/globalnav-929930bcde398a64c647d525ba8b04477c9a1afa.gz.js:40:90433)
    at https://d3rrzw75sdtfe5.cloudfront.net/js/menu-2kjdfskljflksdfjk/globalnav-929930bcde398a64c647d525ba8b04477c9a1afa.gz.js:40:109632
d3rrzw75sdtfe5.cloudfront.net/js/mezz-35gbnwov975sjdhcbsf/mezz-39ae1ec10a35e98cd5be3b5d70b70ed283129b6c.gz.js:1 Uncaught DOMException: Blocked a frame with origin "https://us-west-2.console.aws.amazon.com" from accessing a cross-origin frame.
    at https://d3rrzw75sdtfe5.cloudfront.net/js/mezz-35gbnwov975sjdhcbsf/mezz-39ae1ec10a35e98cd5be3b5d70b70ed283129b6c.gz.js:1:442
    at https://d3rrzw75sdtfe5.cloudfront.net/js/mezz-35gbnwov975sjdhcbsf/mezz-39ae1ec10a35e98cd5be3b5d70b70ed283129b6c.gz.js:1:3469
bootstrap.js:637 Total Load Time:  5082
done @ bootstrap.js:637
environment-default.js:46306 WARN Collab not connected - skipping message Object
log @ environment-default.js:46306
environment-default.js:46311 INFO [jsonalyzer] connecting
environment-default.js:46311 INFO find.nak.list called in installer callback
environment-default.js:46311 INFO connect event received
environment-default.js:46311 INFO Attempting to connect to collab server
environment-default.js:46311 INFO Starting connectHandshakeTimeout
environment-default.js:46311 INFO Loaded collab server in 896 ms
environment-default.js:46311 INFO vfs.id (aka clientId): 9c170mksJLmPe07P
environment-default.js:46311 INFO Starting installation of c9.ide.language.go
environment-default.js:46311 INFO Collab connect call completed -1275
environment-default.js:46311 INFO First message from collab recieved in -84ms
environment-default.js:46311 INFO onConnect received.  Payload: Object
environment-default.js:46311 INFO Collab connected as master
environment-default.js:46311 INFO Collab successfully connected in 2256 ms
environment-default.js:46311 INFO [jsonalyzer] connected
environment-default.js:46311 INFO Successfully installed c9.ide.language.go
environment-default.js:48094 Socket close; reconnecting: transport close
(anonymous) @ environment-default.js:48094
Emitter.emit @ environment-default.js:47038
Socket.onClose @ environment-default.js:46733
(anonymous) @ environment-default.js:46644
Emitter.emit @ environment-default.js:47038
Transport.onClose @ environment-default.js:46761
WS.onClose @ environment-default.js:46955
ws.onclose @ environment-default.js:46940
environment-default.js:48099 Schedule re-connect in: 250
environment-default.js:47782 Smith: EngineIoTransport Disconnect
environment-default.js:47690 Smith: Agent requested disconnect when already disconnected
environment-default.js:46311 INFO Join /server/index.php
environment-default.js:49612 [OT] doc.newLineChar empty for  /server/index.php new file? ok - syncing newline mode to collab server
environment-default.js:46311 INFO Joined /server/index.php
worker.js:9959 [codeintel_worker] Traceback (most recent call last):
  File "<string>", line 14, in <module>

worker.js:9958 Object
environment-default.js:48094 Socket close; reconnecting: transport close
(anonymous) @ environment-default.js:48094
environment-default.js:48099 Schedule re-connect in: 250
environment-default.js:47782 Smith: EngineIoTransport Disconnect
environment-default.js:47690 Smith: Agent requested disconnect when already disconnected
environment-default.js:48094 Socket close; reconnecting: transport close
(anonymous) @ environment-default.js:48094
environment-default.js:48099 Schedule re-connect in: 250
environment-default.js:47782 Smith: EngineIoTransport Disconnect
environment-default.js:47690 Smith: Agent requested disconnect when already disconnected
environment-default.js:48094 Socket close; reconnecting: transport close
(anonymous) @ environment-default.js:48094
environment-default.js:48099 Schedule re-connect in: 250
environment-default.js:47782 Smith: EngineIoTransport Disconnect
environment-default.js:47690 Smith: Agent requested disconnect when already disconnected
environment-default.js:48094 Socket close; reconnecting: transport close
(anonymous) @ environment-default.js:48094
environment-default.js:48099 Schedule re-connect in: 250
environment-default.js:47782 Smith: EngineIoTransport Disconnect
environment-default.js:47690 Smith: Agent requested disconnect when already disconnected
environment-default.js:48094 Socket close; reconnecting: transport close
(anonymous) @ environment-default.js:48094
environment-default.js:48099 Schedule re-connect in: 250
4a99c37072224a7985707e9a43ce8d7f.vfs.cloud9.us-west-2.amazonaws.com/vfs/4a99c37072224a7985707e9a43ce8d7f:1 Failed to load resource: the server responded with a status of 400 ()
environment-default.js:46308 ERROR Error: {"error":{"code":400,"message":"Token has expired","subtype":"EEXPIRED"}}
    at XMLHttpRequest.xhr.onload (https://d3gac9ws0uwh3y.cloudfront.net/c9-6e1c1dbdc5ff-ide/build/configs/ide/@aws/cloud9/configs/ide/environment-default.js:929:73)
log @ environment-default.js:46308
environment-default.js:48410 Unable to connect to preview endpoint, retrying in 81 ms
environment-default.js:46311 INFO Ignored doConnect because there is connection attempt happening already
environment-default.js:47782 Smith: EngineIoTransport Disconnect
environment-default.js:47690 Smith: Agent requested disconnect when already disconnected
VM94:1 Console was cleared
21e67d3c1-719a-4d76-bb73-9486eaa1c9a9-ide.cs50.xyz:8081/:1 Failed to load resource: the server responded with a status of 502 (Bad Gateway)
VM30 4a99c37072224a7985707e9a43ce8d7f:1 Access to fetch at 'https://1e67d3c1-719a-4d76-bb73-9486eaa1c9a9-ide.cs50.xyz:8081/' from origin 'https://us-west-2.console.aws.amazon.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
cs50-bundle.js:2477 TypeError: Failed to fetch
checkResponse @ cs50-bundle.js:2477
environment-default.js:48094 Socket close; reconnecting: transport close
(anonymous) @ environment-default.js:48094
environment-default.js:48099 Schedule re-connect in: 250
environment-default.js:47782 Smith: EngineIoTransport Disconnect
environment-default.js:47690 Smith: Agent requested disconnect when already disconnected
environment-default.js:48094 Socket close; reconnecting: transport close
(anonymous) @ environment-default.js:48094
Emitter.emit @ environment-default.js:47038
Socket.onClose @ environment-default.js:46733
(anonymous) @ environment-default.js:46644
Emitter.emit @ environment-default.js:47038
Transport.onClose @ environment-default.js:46761
WS.onClose @ environment-default.js:46955
ws.onclose @ environment-default.js:46940
environment-default.js:48099 Schedule re-connect in: 250
environment-default.js:47782 Smith: EngineIoTransport Disconnect
environment-default.js:47690 Smith: Agent requested disconnect when already disconnected

But, trying it again, the ecstatic server sprung up. Thank you!

kzidane commented 5 years ago

These seem to be Cloud9 errors and shouldn't be blocking. Thanks for checking!