Blazor-School / Blazor-Library-Public-Issue-Tracker

Public Bug Tracker for Blazor Library
0 stars 0 forks source link

BlazorLibrary not working with Codespaces #2

Closed dajma00 closed 9 months ago

dajma00 commented 10 months ago

I have a project using BlazorLibrary. It works fine on local machine and deployment machine. However, with Github Codespaces, the app crashes with this message:

Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit '0J29eWFlzxc60QQHfWZlWhEWkIfDTW_o4L40QSZTHDY'.
      System.Text.Json.JsonException: '<' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
       ---> System.Text.Json.JsonReaderException: '<' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
         at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
         at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)
         at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first)
         at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
         at System.Text.Json.Utf8JsonReader.Read()
         at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
         --- End of inner exception stack trace ---
         at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
         at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
         at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo`1 jsonTypeInfo, Nullable`1 actualByteCount)
         at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo`1 jsonTypeInfo)
         at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
         at BlazorSchool.Components.Web.Theme.Data.ThemePack.FromJson(String json)
         at BlazorSchool.Components.Web.Theme.BlazorApplyTheme.ThemePackPathUpdate(HttpClient httpClient, IReadOnlyDictionary`2 parameterDictionary)
         at BlazorSchool.Components.Web.Theme.BlazorApplyTheme.SetParametersAsync(ParameterView parameters)
         at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

Any ideas why? Looks like BlazorLibrary trying to get some data but failing.

hevilhuy commented 10 months ago

I think the https:///_content/BlazorSchool.Components.Web/Themes/Default/default.min.json is not accessible

dajma00 commented 10 months ago

hmm.... why the issue on Codespaces only?

hevilhuy commented 10 months ago

hmm.... why the issue on Codespaces only?

I don't know yet. But https:///_content/BlazorSchool.Components.Web/Themes/Default/default.min.json is accessible?

dajma00 commented 10 months ago

Not sure, but if that was the case, why would it work on my development machine as well as live deployment machine?

hevilhuy commented 10 months ago

Please check the URL.