[GH-ISSUE #4381] error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type v1.ClientConfig #3461

Closed
opened 2026-05-05 14:13:36 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @RickoNoNo3 on GitHub (Aug 14, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4381

Bug Description

Windows,使用toml配置时报错:error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type v1.ClientConfig

根据https://github.com/fatedier/frp/issues/3859的方法,检查配置文件格式未发现问题,检查行尾LF或CRLF都无果。

frpc Version

0.59.0

frps Version

0.59.0

System Architecture

windows/adm64

Configurations

frpc.toml:

serverAddr = "x.x.x.x"
serverPort = 8000
transport.protocol = "websocket"
auth.method = token"
auth.token = "******"

[[proxies]]
name = "{{.Envs.FRPC_NAME}}"
type = "{{.Envs.FRPC_TYPE}}"
localIP = "127.0.0.1"
localPort = {{.Envs.FRPC_LOCAL_PORT}}
remotePort = {{.Envs.FRPC_REMOTE_PORT}}

transport.useEncryption = true
transport.useCompression = true

Logs

No response

Steps to reproduce

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @RickoNoNo3 on GitHub (Aug 14, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4381 ### Bug Description Windows,使用toml配置时报错:error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type v1.ClientConfig 根据<https://github.com/fatedier/frp/issues/3859>的方法,检查配置文件格式未发现问题,检查行尾LF或CRLF都无果。 ### frpc Version 0.59.0 ### frps Version 0.59.0 ### System Architecture windows/adm64 ### Configurations `frpc.toml`: ```toml serverAddr = "x.x.x.x" serverPort = 8000 transport.protocol = "websocket" auth.method = “token" auth.token = "******" [[proxies]] name = "{{.Envs.FRPC_NAME}}" type = "{{.Envs.FRPC_TYPE}}" localIP = "127.0.0.1" localPort = {{.Envs.FRPC_LOCAL_PORT}} remotePort = {{.Envs.FRPC_REMOTE_PORT}} transport.useEncryption = true transport.useCompression = true ``` ### Logs _No response_ ### Steps to reproduce _No response_ ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@RickoNoNo3 commented on GitHub (Aug 14, 2024):

抱歉,是引号打成了中文的。。用记事本没发现

<!-- gh-comment-id:2288546189 --> @RickoNoNo3 commented on GitHub (Aug 14, 2024): 抱歉,是引号打成了中文的。。用记事本没发现
Author
Owner

@Yezh1i commented on GitHub (Feb 22, 2025):

确实出现这个问题一般是格式问题

<!-- gh-comment-id:2676039734 --> @Yezh1i commented on GitHub (Feb 22, 2025): 确实出现这个问题一般是格式问题
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#3461
No description provided.