Duplicated requests

  • Hello guys!!

    I’m using quasar to build an application and I’m really enjoying it. The only problem I’m having is that sometimes I got duplicated requests to my server.
    I don’t know how to trigger that or which component is causing it! All I know is that, sometimes, in random moments, my application starts to duplicate all the requests!
    I can see the duplicates on the Network tab, and the most curious thing is that my server stores the duplicated date with the exactly same timestamp.

    I’m sorry not giving you more information, code snippets or prints, the problem is that I really don’t know where to start and what to post here to give you more information 😕

    This problem has became a really pain, I tried to search someone with a similar problem, but didn’t found anything.

    The only thing I can think is that, for some reason, my application is duplicating listeners. I’m using modals with v-if, to render and hide modals when necessary, maybe some listeners of the modals are not being destroyed when the modal is gone… I don’t know…

    Does anyone had this problem before or have some clue to help me with this?

    Thank you very much!

  • @besoares why are you using v-if in modal? And which version of the quasar do you use?

  • @patryckx Hello!

    The version is 1.0.0-beta.0

    I’m using v-if because I’m working with conditional modals, some of them would never appear on the screen. So, insted showing/hidding, I decided to use conditional render.
    Is this a mistake?

  • @besoares first upgrade to latest quasar version. About the duplicate calls, we wont know unless you produce a reproduction pen :/.

  • @metalsadman Yeah, I understand…
    As I said, I really don’t know what is causing that, so I have no idea of what code snippet to post here 😕

    Anyway, I will update quasar and try to isolate one particupar case to post here.

    Thank you very much

  • @besoares please also check the request status code in the network tab.

  • @besoares could also just be an option request, but yeah need more info.

  • @patryckx The duplicated requests has the same status, response and everything else, in the last case I saw it was 200 OK

  • @metalsadman @patryckx

    I finally managed to find the problem with my code.
    The problem was:

    I was registering a vuex store module dinamically, with the “registerModule” method, but I was never checking if that module was alredy loaded.
    I had two different components registering the same module, and this situation was duplicating the dispatch calls !!

Log in to reply