B4J Tutorial [ABMaterial][BANano] Issue(s) with developing in both

Discussion in 'B4J Tutorials' started by OliverA, Jun 10, 2019.

  1. OliverA

    OliverA Expert Licensed User

    First post, first issue:
    I'm in the process of developing an ABM application. For testing purposes, I uploaded the application on my test server. The application may start fine, but when loading another page, the enabled loading animation will load continuously. Server's log shows following entries:
    in a repetitive manner. Now and then, the application will suddenly show the page until another page needs to be shown and the process starts over. Looking at Firefox's log one sees
    Huh?
    I tried another browser, Chrome. Chrome just kept looping through this
    I changed ports on ABM project and voila everything is fine. Hm. While testing Chrome, I noticed that Chrome fired up a previous web page I had served from the same server that was created using BANano. Strange. I thought I stopped that server. After poking around the server for a good hour, including several reboots to see if I can stop this phantom server, nothing was achieved, nothing changed. Ports on ABM project were change to something else and suddenly everything works. Weird. Is something else using up ports 80 and 443 on the server? Checked again. Rebooted again. No. Changed ports back to 80 and 443 on ABM project. Both Firefox and Chrome produced the previous erroneous results. Finally, I try a third browser, Edge. Everything works. What? A light goes off. I previously worked on a BANano project that I served from the same server I am testing the ABM project on. I cleared the cache of both Firefox and Chrome and voila, everything is up and running. Except that I lost my morning on this. Something (installing ABM app with SSL cert) that I thought would be a 15-minute exercise turned into an adventure.

    Lesson learned: When switching between ABMaterial and BANano development, clear the browsers cache! Why am I posting this? So, in case someone else runs into this. Hopefully the log entries above point them to this forum entry (and therefore keep someone from wasting hours in figuring out what the heck is going on).

    Update#1: In Chrome, clearing the Data cache did the trick. For Firefox, both the Data cache and the Cookies had to be cleared. Ugh.

    In case there are other issues that one runs into while developing for both frameworks, feel free to post your experience(s) and solution(s) here.
     
    Last edited: Jun 10, 2019
  2. alwaysbusy

    alwaysbusy Expert Licensed User

    When using a service-worker in BANano, this is indeed something you have to be aware of. A service worker is a very powerful object that caches 'everything' so the whole website/webapp can work, even offline.

    This does result that e.g. if you work on port 80, and you have used a service-worker, you can get weird results like you describe when going to the same path (in ABM or BANano).

    So checking which service workers that are installed (and maybe unregistering it if needed) may also be needed:

    upload_2019-6-11_16-9-37.png
     
    OliverA likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice