Giter VIP home page Giter VIP logo

Comments (11)

David-Moreira avatar David-Moreira commented on May 29, 2024

Hello @realLiangshiwei did you make sure to enable interactivity?

from blazorise.

DenisChimbor avatar DenisChimbor commented on May 29, 2024

I also have a similar issue with the DatePicker on v1.4.0 and net7.0 project. And it happens only on deployed app. If I run the app from Visual Studio everything works.

Microsoft.AspNetCore.Components.Web.ErrorBoundary[0]
      Microsoft.JSInterop.JSException: Failed to fetch dynamically imported module: https://mysite.com/_content/Blazorise/datePicker.js?v=1.4.0.0
      TypeError: Failed to fetch dynamically imported module: https://mysite.com/_content/Blazorise/datePicker.js?v=1.4.0.0
         at Microsoft.JSInterop.JSRuntime.<InvokeAsync>d__16`1[[Microsoft.JSInterop.IJSObjectReference, Microsoft.JSInterop, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext()
         at Blazorise.Modules.BaseJSModule.InvokeSafeVoidAsync(String identifier, Object[] args)
         at Blazorise.Extensions.ModuleExtensions.SafeDestroy(IJSDestroyableModule module, ElementReference elementRef, String elementId)
         at Blazorise.DatePicker`1.<DisposeAsync>d__4[[System.DateTime, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
         at Blazorise.BaseAfterRenderComponent.DisposeAsync()
Microsoft.JSInterop.JSException: Failed to fetch dynamically imported module: https://mysite.com/_content/Blazorise/datePicker.js?v=1.4.0.0
TypeError: Failed to fetch dynamically imported module: https://mysite.com/_content/Blazorise/datePicker.js?v=1.4.0.0
   at Microsoft.JSInterop.JSRuntime.<InvokeAsync>d__16`1[[Microsoft.JSInterop.IJSObjectReference, Microsoft.JSInterop, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext()
   at Blazorise.Modules.BaseJSModule.InvokeSafeVoidAsync(String identifier, Object[] args)
   at Blazorise.Extensions.ModuleExtensions.SafeDestroy(IJSDestroyableModule module, ElementReference elementRef, String elementId)
   at Blazorise.DatePicker`1.<DisposeAsync>d__4[[System.DateTime, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at Blazorise.BaseAfterRenderComponent.DisposeAsync()

from blazorise.

David-Moreira avatar David-Moreira commented on May 29, 2024

@DenisChimbor Please see if this helps you
https://blazorise.com/support/issues/115/blazorise-doesnt-dynamically-resolve-scripts-if-aspnetcore-environment-isnt-set-to-development

from blazorise.

realLiangshiwei avatar realLiangshiwei commented on May 29, 2024

did you make sure to enable interactivity?

Of course, other components work fine except DatePicker

from blazorise.

realLiangshiwei avatar realLiangshiwei commented on May 29, 2024

I think it's a simple problem, wrong filename

import * as inputmask from "./inputmask.js?v=1.4.0.0";

https://github.com/Megabit/Blazorise/blob/master/Source/Blazorise/wwwroot/inputMask.js

  • inputmask.js
  • inputMask.js

from blazorise.

David-Moreira avatar David-Moreira commented on May 29, 2024

I kinda doubt that is the problem. I think the file still gets resolved. WE have apps in 1.4.
Have you tried visiting the url directly with the original path and also with the path that you think is wrong? Is the resource returned?
https://localhost:7231/_content/Blazorise/inputmask.js?v=1.4.0.0
https://localhost:7231/_content/Blazorise/inputMask.js?v=1.4.0.0

from blazorise.

realLiangshiwei avatar realLiangshiwei commented on May 29, 2024

When you use a non-windows system, file name is case-sensitive

The URLs for content exposed with UseDirectoryBrowser and UseStaticFiles are subject to the case sensitivity and character restrictions of the underlying file system. For example, Windows is case insensitive, but macOS and Linux aren't.

https://learn.microsoft.com/en-us/aspnet/core/fundamentals/static-files?view=aspnetcore-8.0#security-considerations-for-static-files

image

from blazorise.

David-Moreira avatar David-Moreira commented on May 29, 2024

Ah, makes sense, the linux fs is case sensitive indepedent of the browser. Thanks for the help troubleshooting it does seem you're right. We'll fix it for next patch. You can try loading the resource manually but I'm not sure it will help.

<script src="_content/Blazorise/inputMask.js?v=1.4.0.0" type="module"></script>

from blazorise.

stsrki avatar stsrki commented on May 29, 2024

Yeah, thanks for looking into this. It's such a dumb mistake from us. I would never guess it. 😅

from blazorise.

realLiangshiwei avatar realLiangshiwei commented on May 29, 2024

I'd like to ask when will release the patch version?

from blazorise.

stsrki avatar stsrki commented on May 29, 2024

Possibly by the end of next week.

from blazorise.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.