Previewing rails server on AWS Cloud 9: VFS Connection does not exist [Firefox only]
Asked Answered
S

7

8

Update: This is specific to Firefox. This does not occur using Chrome. I will leave the text below as is, but now the main question is, how and what in Firefox is causing this. It occurs regardless of cookie settings, such as allowing third-party cookies and trackers.


Preface: I've searched and read dozens of pages trying to resolve this issue I've gone through all the troubleshooting steps in the AWS documentation, eg,

and this thread:

and the c9 forums


I am trying to preview a running rails app from the Cloud 9 IDE. When I run the app using rails server, there are no error messages indicating anything wrong. The output shows Started GET '/' for [my home IP] ...... 200 Completed OK.

Console Output: console output

Trying to preview the running app only produces a "OOPS VFS connection does not exist" screen. The preview url is always https://[user_generated_sequence].vfs.cloud9.[region].amazonaws.com/ All TCP traffic is allowed as per the rules set up by following the troubleshooting guides.

OOPS error message page: console output

The same issue occurs whether using puma or WEBrick. With WEBrick, a popup for the preview link appears, but leads to the same error message page. With puma, the running app is listening on tcp://[localhost/0.0.0.0]:[8080 or 3000]. With WEBrick, it listens instead on http://localhost:8080.

I have followed the instructions exactly in the rails tutorial to set up a simple app. Everything in the code itself should be fine. How can I get this to work correctly? I'm very confused and about to give up on rails.

Shadwell answered 20/12, 2018 at 22:19 Comment(4)
community.c9.io/t/…Pronto
Any luck with this? something that doesn't require burning everything to your God and start fresh?Rivard
Yes, I just use Chrome for AWS now (and some other Google-connected sites that don't work correctly on FF)Shadwell
Make sure your user has read access to the file, for me it was that simple.Supralapsarian
M
7

I recently had the same issues after updating Firefox because cross-site cookies are required to preview a running rails application. If, like me, you have disabled that in Firefox as part of strict Enhanced Tracking Protection, they will need to be enabled at least for this specific site.

Misrepresent answered 14/3, 2021 at 22:16 Comment(3)
This actually did the trick. Thank youCriminal
That should be the correct answer. Just to add: simply change Enhanced Tracking for your website from Standard to Custom and untick Cookies. That should do the trickFawcett
Rather than turning off the cookie protection for all sites, I'd suggest pressing the Manage Exceptions button and add aws.amazon.com and amazonaws.com. You may only need the first domain.Fishmonger
H
4

Make sure you are accessing the preview from the same browser:

This URL works only when the IDE for the environment is open and the application is running in the same web browser

https://docs.aws.amazon.com/cloud9/latest/user-guide/app-preview.html#app-preview-preview-app

Hyperploid answered 28/2, 2020 at 23:16 Comment(0)
U
2

Try disable Ad Blockers and privacy Extention. It worked for me.

Uncouple answered 26/5, 2020 at 1:52 Comment(0)
V
1

Something that worked for me, do the following: run:

rails s

the in the AWS EDE click on 'Preview' and 'Select Running Application'

Once it will open click on the button/link and it should open in another window with the running application. enter image description here

Note: Doing this manually by copying the URL link and pasting in another tab did not work for me.

Vin answered 12/3, 2020 at 11:47 Comment(0)
I
1

Basically you need to allow third party cookies in chrome it's Settings >> Security >> Cookies and web data >> Choose second option(block cookies only in incognito)

That works for me

Inflection answered 8/11, 2021 at 9:37 Comment(0)
S
1

On cloud9, click the shield logo in the address bar and switch "Enhanced Tracking Protection" to be off. Then refresh the page and the preview.

Sethsethi answered 31/10, 2022 at 20:8 Comment(1)
This worked for me. Maybe because I did all of the above and yours was the last thing I needed to change, but whatever. Thanks for the reminder to refresh the preview too!Rhiannonrhianon
M
1

I was struggling with this as well. Finally, I changed the cookie setting from all third-party cookies to cookies from unvisited sites (See image)

Cookie Settings for Firefox

Milt answered 2/11, 2022 at 16:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.