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

MacOS 10.14.3, std.json.JSONException@std/json.d(155): JSONValue is not a string #2279

Closed
shove70 opened this issue Mar 13, 2019 · 3 comments

Comments

@shove70
Copy link
Contributor

commented Mar 13, 2019

in dub.json:

{
	"name" : "d_test007",
	"description" : "Hello World - A minimal DUB bundle.",
	"dependencies" : {
		"vibe-d:http": "~>0.8.5-rc.1"
	}
}

in src/app.d:

import std.stdio;

import vibe.core.core : runApplication;
import vibe.http.fileserver;
import vibe.http.router;
import vibe.http.server;

void main()
{
	auto settings = new HTTPServerSettings;
    settings.port = 8080;

    listenHTTP(settings, (req, res) { res.writeBody("Hello Vibe.d: " ~ req.path); });
    runApplication();
}

Compile and run it, output:
std.json.JSONException@std/json.d(155): JSONValue is not a string

DMD: 2.084.0, 2.085.0
OS: MacOS 10.14.3

@shove70 shove70 changed the title std.json.JSONException@std/json.d(155): JSONValue is not a string MacOS 10.14.3, std.json.JSONException@std/json.d(155): JSONValue is not a string Mar 13, 2019
@shove70

This comment has been minimized.

Copy link
Contributor Author

commented Mar 29, 2019

Is this a issue that only exists in my macos?

@shove70 shove70 closed this Apr 16, 2019
@shove70

This comment has been minimized.

Copy link
Contributor Author

commented Apr 16, 2019

Further discovery is the problem of vibecore 1.6.2, not vibe-d.

@shove70

This comment has been minimized.

Copy link
Contributor Author

commented Apr 27, 2019

After re-examination, problems were found:

The vibe.conf file generated by the shell file ./setup-mac.sh,

If quotation marks are added to the values of "uid" and "gid", this problem can also be avoided.

echo -e '{
"uid": '$USER_ID',
"gid": '$GROUP_ID'
}' >$CONFIG_FILE
Modified to:

echo -e '{
"uid": "'$USER_ID'",
"gid": "'$GROUP_ID'"
}' >$CONFIG_FILE

@shove70 shove70 reopened this Apr 27, 2019
@dlang-bot dlang-bot closed this in 05ea854 Apr 27, 2019
dlang-bot added a commit that referenced this issue Apr 27, 2019
Fix: #2279 - MacOS std.json.JSONException@std/json.d(155): JSONValue …
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.