[GH-ISSUE #860] Config parse issue #229

Closed
opened 2026-10-13 20:16:08 +00:00 by bsakaguchi · 4 comments
Owner

Originally created by @yelgazin on GitHub (Jun 20, 2024).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/860

If not specified PresharedKey in config then ios app could not connect.
"error NE: WG: Can't parse WG config...."

To Reproduce

  1. Create client config according wireguard format without PresharedKey value.
  2. Import config into ios app.
  3. Try to connect.
  4. See error in log.

Expected behavior
Ignore optional parameters.

Originally created by @yelgazin on GitHub (Jun 20, 2024). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/860 If not specified PresharedKey in config then ios app could not connect. "error NE: WG: Can't parse WG config...." **To Reproduce** 1. Create client config according wireguard format without PresharedKey value. 2. Import config into ios app. 3. Try to connect. 4. See error in log. **Expected behavior** Ignore optional parameters.
Author
Owner

@pokamest commented on GitHub (Jun 25, 2024):

What is platform and app version?

<!-- gh-comment-id:2190022429 --> @pokamest commented on GitHub (Jun 25, 2024): What is platform and app version?
Author
Owner

@yelgazin commented on GitHub (Jun 26, 2024):

Yes, sure:
2024-06-19 22:53:21 info Logging has enabled on AmneziaVPN version 4.5.4.2 "62c33e37"
2024-06-19 22:53:21 info iOS 17.5 (arm64)

<!-- gh-comment-id:2190667609 --> @yelgazin commented on GitHub (Jun 26, 2024): Yes, sure: 2024-06-19 22:53:21 info Logging has enabled on AmneziaVPN version 4.5.4.2 "62c33e37" 2024-06-19 22:53:21 info iOS 17.5 (arm64)
Author
Owner

@owmaker commented on GitHub (Jun 27, 2024):

Same problem.

Config (awg0.conf)
[Interface]
PrivateKey = ********************************************
Address = 10.66.66.3/32
DNS = 1.1.1.1, 1.0.0.1
###from 1 to 128
Jc = 30
### < Jmax
Jmin = 60
### < 1280
Jmax = 120
S1 = 55
S2 = 155
H1 = 1953034736
H2 = 752945292
H3 = 3945748733
H4 = 1666444888

[Peer]
PublicKey = ********************************************
AllowedIPs = 0.0.0.0/0
Endpoint = *************:*****
Log (AmneziaVPN.log)
2024-06-27 22:13:59 info Logging has enabled on AmneziaVPN version 4.5.4.2 62c33e37
2024-06-27 22:13:59 info iOS 17.5 (arm64)
2024-06-27 22:14:01 debug VpnConfigurator::getDnsForConfig "1.1.1.1" "1.0.0.1"
2024-06-27 22:14:01 debug "ConnectToVpn, Server index is 0, container is amnezia-awg, route mode is" Settings::VpnOnlyForwardSites
2024-06-27 22:14:01 debug IosController::connectVpn "Server 1 (*************) awg"
2024-06-27 22:14:01 debug IosController::vpnStatusDidChange Vpn::Disconnected <NETunnelProviderSession: 0x300628af0>
2024-06-27 22:14:01 debug IosController::connectVpn : We have received managers: 1
2024-06-27 22:14:01 debug IosController::connectVpn : Using existing tunnel: Server 1 (*************) awg
2024-06-27 22:14:01 debug IosController::startWireGuard
2024-06-27 22:14:01 debug Disconnect error NEVPNConnectionErrorDomain 12 The VPN session failed because an internal error occurred.
2024-06-27 22:14:01 debug Disconnect error info The VPN plugin died unexpectedly.
2024-06-27 22:14:02 debug Vpn::Disconnected
2024-06-27 22:14:02 debug IosController::startTunnel :Server 1 (*************) awgWireGuard : Starting the tunnel succeeded
2024-06-27 22:14:02 debug IosController::vpnStatusDidChange Vpn::Connecting <NETunnelProviderSession: 0x300628af0>
2024-06-27 22:14:02 debug IosController::vpnStatusDidChange Vpn::Connected <NETunnelProviderSession: 0x300628af0>
2024-06-27 22:14:02 info NE: Start tunnel
2024-06-27 22:14:02 error NE: WG: Can't parse WG config: The data couldn’t be read because it is missing.
2024-06-27 22:14:03 info NE: App said: {"tunnelId":"","action":"status"}
2024-06-27 22:14:08 debug IosController::vpnStatusDidChange Vpn::Disconnecting <NETunnelProviderSession: 0x300628af0>
2024-06-27 22:14:08 debug IosController::vpnStatusDidChange Vpn::Disconnected <NETunnelProviderSession: 0x300628af0>
2024-06-27 22:14:08 debug Disconnect error NEVPNConnectionErrorDomain 12 The VPN session failed because an internal error occurred.
2024-06-27 22:14:08 debug Disconnect error info The VPN plugin died unexpectedly.
2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded.
2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded.
2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded.
2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded.
2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded.
2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded.
2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded.
2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded.

Similar configs (for other clients, with different address and keys) work normal at linux, windows and android AmneziaVPN apps.

<!-- gh-comment-id:2195515660 --> @owmaker commented on GitHub (Jun 27, 2024): Same problem. <details> <summary>Config (awg0.conf)</summary> [Interface] PrivateKey = ******************************************** Address = 10.66.66.3/32 DNS = 1.1.1.1, 1.0.0.1 ###from 1 to 128 Jc = 30 ### < Jmax Jmin = 60 ### < 1280 Jmax = 120 S1 = 55 S2 = 155 H1 = 1953034736 H2 = 752945292 H3 = 3945748733 H4 = 1666444888 [Peer] PublicKey = ******************************************** AllowedIPs = 0.0.0.0/0 Endpoint = *************:***** </details> <details> <summary>Log (AmneziaVPN.log)</summary> 2024-06-27 22:13:59 info Logging has enabled on AmneziaVPN version 4.5.4.2 62c33e37 2024-06-27 22:13:59 info iOS 17.5 (arm64) 2024-06-27 22:14:01 debug VpnConfigurator::getDnsForConfig "1.1.1.1" "1.0.0.1" 2024-06-27 22:14:01 debug "ConnectToVpn, Server index is 0, container is amnezia-awg, route mode is" Settings::VpnOnlyForwardSites 2024-06-27 22:14:01 debug IosController::connectVpn "Server 1 (*************) awg" 2024-06-27 22:14:01 debug IosController::vpnStatusDidChange Vpn::Disconnected <NETunnelProviderSession: 0x300628af0> 2024-06-27 22:14:01 debug IosController::connectVpn : We have received managers: 1 2024-06-27 22:14:01 debug IosController::connectVpn : Using existing tunnel: Server 1 (*************) awg 2024-06-27 22:14:01 debug IosController::startWireGuard 2024-06-27 22:14:01 debug Disconnect error NEVPNConnectionErrorDomain 12 The VPN session failed because an internal error occurred. 2024-06-27 22:14:01 debug Disconnect error info The VPN plugin died unexpectedly. 2024-06-27 22:14:02 debug Vpn::Disconnected 2024-06-27 22:14:02 debug IosController::startTunnel :Server 1 (*************) awgWireGuard : Starting the tunnel succeeded 2024-06-27 22:14:02 debug IosController::vpnStatusDidChange Vpn::Connecting <NETunnelProviderSession: 0x300628af0> 2024-06-27 22:14:02 debug IosController::vpnStatusDidChange Vpn::Connected <NETunnelProviderSession: 0x300628af0> 2024-06-27 22:14:02 info NE: Start tunnel 2024-06-27 22:14:02 error NE: WG: Can't parse WG config: The data couldn’t be read because it is missing. 2024-06-27 22:14:03 info NE: App said: {"tunnelId":"","action":"status"} 2024-06-27 22:14:08 debug IosController::vpnStatusDidChange Vpn::Disconnecting <NETunnelProviderSession: 0x300628af0> 2024-06-27 22:14:08 debug IosController::vpnStatusDidChange Vpn::Disconnected <NETunnelProviderSession: 0x300628af0> 2024-06-27 22:14:08 debug Disconnect error NEVPNConnectionErrorDomain 12 The VPN session failed because an internal error occurred. 2024-06-27 22:14:08 debug Disconnect error info The VPN plugin died unexpectedly. 2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded. 2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded. 2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded. 2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded. 2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded. 2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded. 2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded. 2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded. </details> Similar configs (for other clients, with different address and keys) work normal at linux, windows and android AmneziaVPN apps.
Author
Owner

@Nethius commented on GitHub (Feb 21, 2025):

check latest release, if persists then reopen issue

<!-- gh-comment-id:2674704887 --> @Nethius commented on GitHub (Feb 21, 2025): check latest release, if persists then reopen issue
Sign in to join this conversation.
No labels
pull-request
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
amnezia-vpn/amnezia-client#229
No description provided.