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

Exception message: Operation performed on a socket which has not been registered with the dispatcher yet #152

Open
vanyle opened this issue Feb 8, 2022 · 2 comments

Comments

@vanyle
Copy link

vanyle commented Feb 8, 2022

When serving static files, I get the following error.

  #[                                                                                                    
    C:\Users\vanyle\.nimble\pkgs\prologue-0.5.2\prologue\core\application.nim(535)    run               
    C:\Users\vanyle\.nimble\pkgs\prologue-0.5.2\prologue\core\application.nim(530)    run               
    C:\Users\vanyle\.nimble\pkgs\prologue-0.5.2\prologue\core\naive\server.nim(30)    serve             
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncdispatch.nim(1961)  waitFor           
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncdispatch.nim(1653)  poll              
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncdispatch.nim(419)   runOnce           
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncdispatch.nim(234)   processPendingCallbacks                                                                                                   
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncmacro.nim(28)       anonymousNimAsyncContinue                                                                                                 
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncmacro.nim(131)      anonymousIter     
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncfutures.nim(389)    read              
  ]#                                                                                                    
  #[                                                                                                    
    C:\Users\vanyle\.nimble\pkgs\prologue-0.5.2\prologue\core\application.nim(535)    run               
    C:\Users\vanyle\.nimble\pkgs\prologue-0.5.2\prologue\core\application.nim(530)    run               
    C:\Users\vanyle\.nimble\pkgs\prologue-0.5.2\prologue\core\naive\server.nim(30)    serve             
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncdispatch.nim(1961)  waitFor           
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncdispatch.nim(1653)  poll              
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncdispatch.nim(419)   runOnce           
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncdispatch.nim(234)   processPendingCallbacks                                                                                                   
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncmacro.nim(28)       switchNimAsyncContinue                                                                                                    
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncmacro.nim(131)      switchIter        
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncfutures.nim(389)    read              
  ]#                                                                                                    
  #[                                                                                                             
    C:\Users\vanyle\.nimble\pkgs\prologue-0.5.2\prologue\core\application.nim(535)    run               
    C:\Users\vanyle\.nimble\pkgs\prologue-0.5.2\prologue\core\application.nim(530)    run               
    C:\Users\vanyle\.nimble\pkgs\prologue-0.5.2\prologue\core\naive\server.nim(30)    serve             
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncdispatch.nim(1961)  waitFor           
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncdispatch.nim(1653)  poll              
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncdispatch.nim(419)   runOnce           
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncdispatch.nim(234)   processPendingCallbacks                                                                                                   
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncmacro.nim(28)       anonymousNimAsyncContinue                                                                                                 
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncmacro.nim(131)      anonymousIter     
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncfutures.nim(389)    read              
  ]#                                                                                                    
  #[                                                                                                         
    C:\Users\vanyle\.nimble\pkgs\prologue-0.5.2\prologue\core\application.nim(535)    run               
    C:\Users\vanyle\.nimble\pkgs\prologue-0.5.2\prologue\core\application.nim(530)    run               
    C:\Users\vanyle\.nimble\pkgs\prologue-0.5.2\prologue\core\naive\server.nim(30)    serve             
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncdispatch.nim(1961)  waitFor           
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncdispatch.nim(1653)  poll              
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncdispatch.nim(419)   runOnce           
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncdispatch.nim(234)   processPendingCallbacks                                                                                                   
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncmacro.nim(28)       switchNimAsyncContinue                                                                                                    
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncmacro.nim(131)      switchIter        
    C:\Users\vanyle\.choosenim\toolchains\nim-1.6.0\lib\pure\asyncfutures.nim(389)    read              
  ]#                                                                                                    
Exception message: Operation performed on a socket which has not been registered with the dispatcher yet

OS: Windows 11, Nim version: 1.6.0
Source code:

# imports and function definitions ...

var app = newApp(settings = settings) # debug is true
app.use(sessionMiddleware(settings))
app.use(staticFileMiddleware("static"))

app.get("/some_route", render_route1, name = "route1")
app.get("/some_other_route", render_route2, name = "route2")
app.get("/", render_main, name = "main")
app.all("*", render_404)

app.run()

Any idea why ?

@ringabout
Copy link
Member

That's strange. Could you try the latest Prologue version (0.5.4) which includes a critical fix?

@hmbemba
Copy link

hmbemba commented Jan 12, 2024

Anyone ever figured the answer to this? Having the same issue on Win10 with prologue 0.6.4 when I use websockets. If I build for linux and run the app using WSL I have no issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants