forgecode icon indicating copy to clipboard operation
forgecode copied to clipboard

[Bug]: Cannot set provider or log in

Open mslinn opened this issue 7 months ago • 23 comments

Bug Description

I installed Forgecode for the first time. Following the docs:

$ forge provider login
● [11:47:26] Cancelled

I tried running forge by itself and discovered that some config files are missing:

$ ls -alF ~/forge/
total 76
drwxrwxr-x  3 mslinn mslinn  4096 Apr 10 11:26 ./
drwxr-xr-x 95 mslinn mslinn  4096 Apr 10 10:46 ../
-rw-rw-r--  1 mslinn mslinn   425 Apr 10 10:44 .credentials.json
-rw-r--r--  1 mslinn mslinn 57344 Apr 10 11:26 .forge.db
-rw-rw-r--  1 mslinn mslinn    94 Apr 10 11:26 .forge_history
drwxrwxr-x  3 mslinn mslinn  4096 Apr 10 10:44 cache/

Without a config file, nothing works.

$ forge config set provider google
● [11:17:13] ERROR: Provider Google is not available. Login again to configure it.
mslinn@Bear instrument_recorder (master)
$ forge config set provider gemini
● [11:17:20] ERROR: Provider Gemini is not available. Login again to configure it.
mslinn@Bear instrument_recorder (master)
$ forge config set provider minimax
● [11:17:33] ERROR: Parameter selection cancelled

As a new user, I think the road ahead with this product looks bleak.

Steps to Reproduce

As described

Expected Behavior

As described

Actual Behavior

As described

Forge Version

2.8.0

Operating System & Version

WSL (current)

AI Provider

None possible

Model

None possible

Installation Method

npm install -g forgecode@latest

Configuration

Missing

mslinn avatar Apr 10 '26 15:04 mslinn

Can u try exec zsh once and then retry.

tusharmath avatar Apr 10 '26 15:04 tusharmath

❯ exec zsh ● [11:54:42] ERROR: No default provider set.

mslinn avatar Apr 10 '26 15:04 mslinn

Can u run forge zsh doctor. Most probably fzf isn't installed.

tusharmath avatar Apr 10 '26 15:04 tusharmath

Also if you install via curl you won't need to install fzf.

curl -fsSL https://forgecode.dev/cli | sh

We had a small issue in the script for a few hours, but its fixed now.

tusharmath avatar Apr 10 '26 15:04 tusharmath

$ curl -fsSL https://forgecode.dev/cli | sh
Installing Forge and dependencies (fzf, bat, fd)...
Detected platform: x86_64-unknown-linux-gnu
Removing any previous npm-managed forge installation...

removed 1 package in 287ms
Downloading Forge from https://github.com/tailcallhq/forgecode/releases/latest/download/forge-x86_64-unknown-linux-gnu...
Installing to /home/mslinn/.local/bin/forge...

✓ Forge has been successfully installed!
forge 2.9.8
Run 'forge' to get started.

Installing dependencies...
✓ fzf 0.60 is already installed and compatible
Installing bat...
✓ bat installed successfully
Installing fd...
✓ fd installed successfully

Installation complete!
Tools installed: forge, fzf, bat, fd
Because this installer runs via '| sh', your current shell may still use old PATH values.
Open a new terminal or run: exec bash

$ forge zsh doctor
-bash: /home/mslinn/.nvm/versions/node/v25.8.2/bin/forge: No such file or directory

$ exec bash

$ forge zsh doctor
● [12:00:44] ERROR: Failed to execute zsh doctor script
    Caused by: No such file or directory (os error 2)

mslinn avatar Apr 10 '26 16:04 mslinn

Can u run exec zsh instead of exec bash

tusharmath avatar Apr 10 '26 17:04 tusharmath

For me similar problem since 2.9.8 Forge cli works, but zsh setup : Hi doesn't work with error message ERROR: Provider MiniMax is not available. Login again to configure it. Only as example, other providers don't work either

Wang-tianhao avatar Apr 11 '26 04:04 Wang-tianhao

Same here with the ZaiCoding on mac, mostly plain zsh profile:

ERROR: Provider ZaiCoding is not available. Login again to configure it.

First prompt in the conversation often works tho, then it breaks.

forge running in repl mode seems to be working fine, claude with the same API key is fine too

nvkv avatar Apr 12 '26 22:04 nvkv

The same problem. Looks like only with zsh plugin. After ForgeService logout only first request, eg : hi proceed successfully, but all next requests return error. Using forge directly doesn't have this problem.

Info: forge 2.10.0 && zsh 5.9 (arm64-apple-darwin25.0)

aborovmind avatar Apr 13 '26 13:04 aborovmind

Probably fixed with new release? I can confirm that the problem most likely from binary, because I built again with source code, then it was working Ok, no such behavior.

Wang-tianhao avatar Apr 13 '26 16:04 Wang-tianhao

Is anyone facing this in latest release?

amitksingh1490 avatar Apr 14 '26 07:04 amitksingh1490

I'm kind of do. It's working much better, but still failing from time to time

nvkv avatar Apr 14 '26 08:04 nvkv

D:\aa-forgecode>forge provider login ● [17:05:39] Cancelled

D:\aa-forgecode>forge provider logout ● [17:05:40] Cancelled

D:\aa-forgecode>forge --version forge 2.11.0

HuangXinHao avatar Apr 14 '26 09:04 HuangXinHao

@HuangXinHao can u run forge doctor? May be u don't have fzf?

tusharmath avatar Apr 14 '26 09:04 tusharmath

I'm kind of do. It's working much better, but still failing from time to time

Is it happening for any specific provider?

amitksingh1490 avatar Apr 14 '26 11:04 amitksingh1490

I'm kind of do. It's working much better, but still failing from time to time

Is it happening for any specific provider?

Only using it with Z.ai Coding Plan here, so can't say for sure

nvkv avatar Apr 14 '26 12:04 nvkv

I'm kind of do. It's working much better, but still failing from time to time

Is it happening for any specific provider?

I tried, it's not provider specific error

Wang-tianhao avatar Apr 14 '26 16:04 Wang-tianhao

Image

Same for me.

% forge --version
forge 2.11.0

% zsh --version
zsh 5.9 (arm64-apple-darwin25.0)

% zimfw version
1.20.0

[!NOTE] The error is only visible for few millis and then disappears.

lenart avatar Apr 14 '26 22:04 lenart

i can use it by npm , but not in .sh

HuangXinHao avatar Apr 15 '26 01:04 HuangXinHao

Actually I can confirm that I'm seeing this errors from time to time even with local ollama now.

Also might or might not be related, often seeing this:

● [08:11:37] Continue f6fe483a-7656-4302-b792-9b24fee6481e
● [08:11:38] ERROR: POST http://127.0.0.1:11434/v1/chat/completions

Caused by:
    0: error sending request for url (http://127.0.0.1:11434/v1/chat/completions)
    1: client error (Connect)
    2: tcp open error
    3: Too many open files (os error 24)

nvkv avatar Apr 15 '26 06:04 nvkv