Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: "Timeout reached while waiting for Roblox Studio to come online" #21

Open
grilme99 opened this issue Apr 14, 2021 · 16 comments
Open
Labels
bug Something isn't working

Comments

@grilme99
Copy link

When using run-in-roblox in a windows-latest GitHub Action I get the error Timeout reached while waiting for Roblox Studio to come online. This happens 100% of the time in the action but I am not able to reproduce it locally.

I am running run-in-roblox with a .rbxl file that is 17MB in size. The following is the relevent part of my workflow YML:

- name: Install Roblox Studio
  uses: OrbitalOwen/[email protected]
  with:
      cookie: ${{ secrets.ROBLOSECURITY }}
      token: ${{ secrets.GITHUB_TOKEN }}
  timeout-minutes: 2

- name: Run unit tests with run-in-roblox
  run: npm test

The npm test command is run-in-roblox --place game.rbxl --script ci-scripts/unit-testing.lua.

@LPGhatguy
Copy link
Collaborator

Agh, these issues are a pain to diagnose; I'm sorry you ran into this.

In the past, the culprits of these issues were things like:

  1. The authentication cookie used in the installation is no longer valid. Testing it independently is a good idea if you haven't already.
  2. Something about the Roblox Studio Bootstrapper changed. Maybe it's stuck on something! Maybe they've finally changed the way that credentials are stored. 😅

@LPGhatguy LPGhatguy added the bug Something isn't working label Apr 14, 2021
@LPGhatguy
Copy link
Collaborator

Sounds like multiple people might be running into this. @jeparlefrancais or @OrbitalOwen, have either of you run into this before? Any ideas?

@boatbomber
Copy link
Member

I'm encountering this issue as well, but flaky (unlike OP who has 100% failure).

thread '' panicked at 'called Result::unwrap() on an Err value: Timeout reached while waiting for Roblox Studio to come online', src/main.rs:75:9

Sometimes it hits this error, sometimes it doesn't. I just rerun the workflow and hope to get lucky (and use up all of my Actions minutes).

@boatbomber
Copy link
Member

boatbomber commented Jan 10, 2022

If it helps, my workflow is a bit different than most people's. I install studio, then open with a blank .lua file to finalize the installation (this flaky fails) and make Studio create directories, then edit those files to make fflag changes, then open my actual test file and script.

jobs:
  Curriculum:
    strategy:
      fail-fast: false
    runs-on: windows-latest
    timeout-minutes: 13
    steps:
      # Get dependencies
      - name: Checkout repository
        uses: actions/checkout@v1
        with:
          submodules: recursive

      - name: Studio installation
        uses: OrbitalOwen/[email protected]
        with:
          cookie: ${{ secrets.ROBLOSECURITY }}
          token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

      - name: Foreman installation
        uses: rojo-rbx/setup-foreman@v1
        with:
          token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

        # Build .rbxlx file
      - name: Build test project
        run: rojo build default.project.json -o ./tests/test.rbxlx

        # Open Studio so it finalizes installation
      - name: Open Studio to finalize installation
        run: |
          New-Item ./noop.lua
          Set-Content ./noop.lua '--noop'
          run-in-roblox --place ./tests/test.rbxlx --script ./noop.lua

        # Edit fast flags
      - name: Edit FFlags
        run: |
          $flags = Get-Content -Path C:/Users/*/AppData/Local/Roblox/ClientSettings/StudioAppSettings.json -Raw | ConvertFrom-Json
          $flags.AnyCustomFlagsHere=$true
          New-Item -Path 'C:/Program Files (x86)/Roblox/Versions/version-*/' -Name "ClientSettings" -ItemType "directory"
          New-Item -Path 'C:/Program Files (x86)/Roblox/Versions/version-*/ClientSettings' -Name "ClientAppSettings.json"
          $flags | ConvertTo-Json -depth 32| set-content -Path 'C:/Program Files (x86)/Roblox/Versions/version-*/ClientSettings/ClientAppSettings.json'

      # Run tests with run-in-roblox
      - name: Run tests
        run: run-in-roblox --place ./tests/test.rbxlx --script ./tests/Curriculum.spec.lua

@boatbomber
Copy link
Member

boatbomber commented Jan 10, 2022

I tried a .rbxl vs .rbxlx and found no difference.

I did find one thing of note- it's possible for the action to work on the first time opening studio and then fail on the second, which suggests that setup/installation/cookie is not related to this issue.
image

@boatbomber
Copy link
Member

boatbomber commented Jan 10, 2022

After a lot more testing, I've found that this seems to be tied to StudioUseNewLoginDataEndpoint. (I would appreciate another person verifying this as well.)

A temporary workaround is to disable this feature flag before calling run-in-roblox:

  # Flip flag that causes issue
  - name: Create fflag overrides
    run: |
      $flags = @{DFIntStudioUseNewLoginDataEndpointHundredthPercent=0; FFlagStudioUseNewLoginDataEndpoint=$false}
      New-Item -Path 'C:/Program Files (x86)/Roblox/Versions/version-*/' -Name "ClientSettings" -ItemType "directory"
      New-Item -Path 'C:/Program Files (x86)/Roblox/Versions/version-*/ClientSettings' -Name "ClientAppSettings.json"
      $flags | ConvertTo-Json -depth 32| set-content -Path 'C:/Program Files (x86)/Roblox/Versions/version-*/ClientSettings/ClientAppSettings.json'


  # Run your tests with run-in-roblox
  - name: Run tests
    run: |
      run-in-roblox --place ./tests/test.rbxl --script ./tests/TestRunner.lua

@vocksel
Copy link

vocksel commented Jan 20, 2022

Adding the following for me has resolved the issue (for now):

- name: Add RBXID to the Windows registry
  run: REG ADD HKCU\Software\RobloxStudioBrowser\roblox.com /t REG_SZ /v .RBXID /d "${{ secrets.RBXID }}"

I have been getting consistent test passes with this step. It also does not appear flipping flags is necessary anymore.

This is something that should be included in roblox-win-installer as it already adds the ROBLOSECURITY cookie to the registry. If someone could look into making this change it would be much appreciated

@RuizuKun-Dev
Copy link

RuizuKun-Dev commented Mar 24, 2022

What are the odds, I also got the same issue and can't reproduce it locally

image

@RuizuKun-Dev
Copy link

RuizuKun-Dev commented Mar 24, 2022

@vocksel what is secrets.RBXID and how do I get it?

I assumed is it the Roblox UserId of the cookie owner

After doing both methods the test still fails for me

image

name: Roblox Unit Test

on: [push]

jobs:
  Run-Tests:
    runs-on: windows-latest
    timeout-minutes: 10

    steps:
      - uses: actions/checkout@v1

      - name: Install Tools
        uses: Roblox/setup-foreman@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

      - name: Install Roblox Studio
        uses: OrbitalOwen/[email protected]
        with:
          cookie: ${{ secrets.ROBLOSECURITY }}
          token: ${{ secrets.GITHUB_TOKEN }}

      - name: Add RBXID to the Windows registry
        run: REG ADD HKCU\Software\RobloxStudioBrowser\roblox.com /t REG_SZ /v .RBXID /d "${{ secrets.RBXID }}"

      # Flip flag that causes issue
      - name: Create fflag overrides
        run: |
          $flags = @{DFIntStudioUseNewLoginDataEndpointHundredthPercent=0; FFlagStudioUseNewLoginDataEndpoint=$false}
          New-Item -Path 'C:/Program Files (x86)/Roblox/Versions/version-*/' -Name "ClientSettings" -ItemType "directory"
          New-Item -Path 'C:/Program Files (x86)/Roblox/Versions/version-*/ClientSettings' -Name "ClientAppSettings.json"
          $flags | ConvertTo-Json -depth 32| set-content -Path 'C:/Program Files (x86)/Roblox/Versions/version-*/ClientSettings/ClientAppSettings.json'

      - name: Run tests
        run: |
          run-in-roblox --place "./Time Attack!.rbxlx" --script ./src/TestService/TestServer/init.lua
          run-in-roblox --place "./Time Attack!.rbxlx" --script ./src/TestService/TestClient/init.lua

@vocksel
Copy link

vocksel commented Mar 25, 2022

@vocksel what is secrets.RBXID and how do I get it?

RBXID is a cookie required for authenticating with Studio. You can find it in the same place as your ROBLOSECURITY cookie.

I haven't had good luck recently getting this workflow to work, but I'm told that flipping FFlagStudioUseNewLoginDataEndpoint to false (like you're doing) should be enough right now (In conjunction with both ROBLOSECURITY and RBXID as secrets)

But I'm not confident that this solution will last forever

@AmberGraceRblx
Copy link

@vocksel Flipping the flag worked for a while, but the most recent CI runs I've had have failed. It's not future proof, and I think the future is now.

@recanman
Copy link

My runs have been failing and I can't get this to work.

I realized that Roblox made a change in which cookies are invalidated with IP changes.

How would I go about logging in and getting the cookies from the workflow? I'm not too familiar with these things.

@DevelopmentIntensified
Copy link

Any updates on this? I am running into the same issue

@fjanetzki
Copy link

I'm running into the same issue.

@MayGo
Copy link

MayGo commented Dec 2, 2024

Anybody got anything working on CI?

@RuizuKun-Dev
Copy link

Anybody got anything working on CI?

i'm pretty sure nobody has been working on this for a while now

try looking into Cloud API for Luau Tasks

https://devforum.roblox.com/t/beta-open-cloud-engine-api-for-executing-luau/3172185

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants