firebasegoogle-apps-scriptclaspfirebase-studio

Firebase Studio does not work with Google Apps Script while previously idx use to work


Project IDX used to be standalone but it is nowadays part of Firebase Studio. Previously, I was able to use IDX with Google Apps Script following these steps:

  1. Create a blank workspace on IDX.

  2. Install clasp using following the terminal command

    npm install @google/clasp -g

  3. Login to clasp using:

    clasp login

  4. Open the URL that appears in the terminal window in a web browser, and grant permission to use my Google account.

  5. Copy the URL from following window, run it by opening another terminal window in IDX, and curl that URL with:

    curl <<<the copied url

This final step used to give me the message Logged in! but now in Firebase Studio i am getting this error:

curl: (7) Failed to connect to localhost port 45633 after 0 ms: Could not connect to server

How can I use IDX with Google Apps Script under Firebase Studio?


Solution

  • In your situation, as another approach, how about manually putting in the authorization code? So, please try the following steps.

    1. Install the clasp.

      npm install @google/clasp -g
      
    2. Authorize the scopes. --no-localhost means Do not run a local server, manually enter code instead.. Ref

      clasp login --no-localhost
      
    3. Copy the URL of Authorize clasp by visiting the following URL on another device:, and paste it into the browser and authorize the scopes on the browser.

    4. Manually copy and paste the authorized code. Please copy the URL of the browser. It might be like http://localhost:8888/?code=###&scope=,,,. Please copy and paste the whole URL into the terminal. By this, the following response is returned.

      You are logged in as ###yourEmail###.
      

    I thought that by the above process, the clasp could be used.