Closed diabl0w closed 5 years ago
ASPNETCORE_PATHBASE doesn't start with "/" maybe?
that variable is correctly set, I tried removing the / to see what would happen and error didn't change... here's the full output:
andled Exception: System.ArgumentException: The path in 'value' must start
with '/'.
Parameter name: value
at Microsoft.AspNetCore.Http.PathString..ctor(String value)
at Microsoft.AspNetCore.Http.PathString.op_Implicit(String s)
at HomeAutio.Mqtt.GoogleHome.Startup.Configure(IApplicationBuilder app, IH
ostingEnvironment env) in /app/HomeAutio.Mqtt.GoogleHome/Startup.cs:line 236
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicat
ionBuilder app)
at Microsoft.AspNetCore.Mvc.Internal.MiddlewareFilterBuilderStartupFilter.
<>cDisplayClass0_0.
I did just do a bunch of upgrades to my home automation system and new router firmware so unfortunately I'm not sure how to track this down. I also updated HomeAutio docker to the latest image so I was hoping it was just a bug in the newer image
I apologize, this is actually the full output:
18:27:34 INF] Loaded with configuration from: appsettings.json, /app/config/
appsettings.Production.json
[18:27:35 WRN] Using an in-memory repository. Keys will not be persisted to s
torage.
[18:27:35 WRN] Neither user profile nor HKLM registry available. Using an eph
emeral key repository. Protected data will be unavailable when application ex
its.
[18:27:35 INF] Creating key {XXXXX} with creat
ion date 2019-01-22 23:27:35Z, activation date 2019-01-22 23:27:35Z, and expi
ration date 2019-04-22 23:27:35Z.
[18:27:35 WRN] No XML encryptor configured. Key {XXXXX} may be persisted to storage in unencrypted form.
Application startup exception: System.ArgumentException: The path in 'value'
must start with '/'.
Parameter name: value
at Microsoft.AspNetCore.Http.PathString..ctor(String value)
at Microsoft.AspNetCore.Http.PathString.op_Implicit(String s)
at HomeAutio.Mqtt.GoogleHome.Startup.Configure(IApplicationBuilder app, IH
ostingEnvironment env) in /app/HomeAutio.Mqtt.GoogleHome/Startup.cs:line 236
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicat
ionBuilder app)
at Microsoft.AspNetCore.Mvc.Internal.MiddlewareFilterBuilderStartupFilter.
<>cDisplayClass0_0.
Unhandled Exception: System.ArgumentException: The path in 'value' must start
with '/'.
Parameter name: value
at Microsoft.AspNetCore.Http.PathString..ctor(String value)
at Microsoft.AspNetCore.Http.PathString.op_Implicit(String s)
at HomeAutio.Mqtt.GoogleHome.Startup.Configure(IApplicationBuilder app, IH
ostingEnvironment env) in /app/HomeAutio.Mqtt.GoogleHome/Startup.cs:line 236
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicat
ionBuilder app)
at Microsoft.AspNetCore.Mvc.Internal.MiddlewareFilterBuilderStartupFilter.
<>cDisplayClass0_0.
Well mine's working, so that implies its a config issue.
Your exception there, Startup line 236 is indeed where it grabs the environment variable ASPNETCORE_PATHBASE. Are you SURE you are setting that correctly with the Docker command? Should look something like this when you run the docker command:
docker run --restart=always --name $IMAGENAME --user=1000 -dit -p 5000:5000 -v /configpath:/app/config -v /logspath:/app/logs -e ASPNETCORE_PATHBASE="/google/home" -e TZ=America/New_York $REPOSITORY
You could delete the image first and recreate the container just to make sure a previous bad command isn't being saved.
docker stop $IMAGENAME
docker rm $IMAGENAME
Then execute that docker run again.
It's working now, I changed two things. 1st, I had the docker startup command sitting in a txt file so I wouldn't forget it and was running it as $(cat dockerstart.txt) so instead I just ran the command directly, but I also removed the quotes around "/google/home" in the ASPNET variable, so it starts with a "/" instead of a quotation mark.
I'm not sure what fixed it but it's working now, running on raspberry pi. Sorry to bother you man, but I didn't know what that error log meant and you telling me that it was definitely something wrong with the ASPNET variable helped so I didn't spend hours looking elsewhere.
Thank you
On Tue, Jan 22, 2019, 6:32 PM Michael Hallock <notifications@github.com wrote:
Well mine's working, so that implies its a config issue.
Your exception there, Startup line 236 is indeed where it grabs the environment variable ASPNETCORE_PATHBASE. Are you SURE you are setting that correctly with the Docker command? Should look something like this when you run the docker command:
docker run --restart=always --name $IMAGENAME --user=1000 -dit -p 5000:5000 -v /configpath:/app/config -v /logspath:/app/logs -e ASPNETCORE_PATHBASE="/google/home" -e TZ=America/New_York $REPOSITORY
You could delete the image first and recreate the container just to make sure a previous bad command isn't being saved.
docker stop $IMAGENAME docker rm $IMAGENAME
Then execute that docker run again.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/i8beef/HomeAutio.Mqtt.GoogleHome/issues/46#issuecomment-456606729, or mute the thread https://github.com/notifications/unsubscribe-auth/APYcMoIYqEATHV5sUUsyjJvlGPYsQiA3ks5vF5-UgaJpZM4aL9JF .
No problem man, any time. The quotes SHOULD be valid (thats how I run mine), so I'm not sure whats up, but glad its working for you again.
Here is the main part of the log:
Application startup exception: System.ArgumentException: The path in 'value' must start with '/'. Parameter name: value at Microsoft.AspNetCore.Http.PathString..ctor(String value) .... .... at HomeAutio.Mqtt.GoogleHome.Program.Main(String[] args) in /app/HomeAutio .Mqtt.GoogleHome/Program.cs:line 45