#metabrainz

/

      • iliekcomputers
        If you're doing LB webserver dev, you most probably won't need the spark containers at all.
      • 2020-01-26 02653, 2020

      • iliekcomputers
        And vice versa
      • 2020-01-26 02658, 2020

      • reosarevok
        yvanzo: thanks! Might want to mark unresolved for now?
      • 2020-01-26 02612, 2020

      • yvanzo
        I did already :)
      • 2020-01-26 02651, 2020

      • pristine__
        iliekcomputers: sounds cool :)
      • 2020-01-26 02653, 2020

      • d4rkie joined the channel
      • 2020-01-26 02632, 2020

      • D4RK-PH0ENiX has quit
      • 2020-01-26 02626, 2020

      • yvanzo
        bitmap, reosarevok: About the localization issue of the other day: I found out that $c.stash.current_language is always set to 'en' (in <BottoMenu> at least). Still no idea what is causing this for now.
      • 2020-01-26 02632, 2020

      • ishaanshah[m]
        iliekcomputers: Which browser are you using?
      • 2020-01-26 02647, 2020

      • iliekcomputers
        Firefox
      • 2020-01-26 02613, 2020

      • ishaanshah[m]
        Can you try on chrome or chromium
      • 2020-01-26 02602, 2020

      • iliekcomputers
        lemme try on chrome
      • 2020-01-26 02637, 2020

      • iliekcomputers
        *chromium
      • 2020-01-26 02648, 2020

      • ishaanshah[m]
        It seems that the server is sending the file as text/html
      • 2020-01-26 02647, 2020

      • iliekcomputers
        same on chrome
      • 2020-01-26 02651, 2020

      • iliekcomputers
        (ium)
      • 2020-01-26 02658, 2020

      • iliekcomputers
        but the error is a 404 for some reason.
      • 2020-01-26 02603, 2020

      • iliekcomputers
        `GET http://0.0.0.0/static/import.js net::ERR_ABORTED 404 (NOT FOUND)`
      • 2020-01-26 02654, 2020

      • ishaanshah[m]
        In the network tab can you look at the type of import.js you are getting.
      • 2020-01-26 02641, 2020

      • iliekcomputers
        it's 404ing for me.
      • 2020-01-26 02648, 2020

      • iliekcomputers
        let me see what I get on firefox
      • 2020-01-26 02614, 2020

      • iliekcomputers
        right
      • 2020-01-26 02616, 2020

      • iliekcomputers
        404
      • 2020-01-26 02620, 2020

      • iliekcomputers
        type: html
      • 2020-01-26 02631, 2020

      • shivam-kapila
        iliekcomputers: I will close the PR. I agree that it will bring all the containers up when user intends to use one of the webspark or spark containers.
      • 2020-01-26 02647, 2020

      • iliekcomputers
        ishaanshah[m]: do you want a screenshot?
      • 2020-01-26 02608, 2020

      • ishaanshah[m]
        That would be helpful
      • 2020-01-26 02628, 2020

      • iliekcomputers
      • 2020-01-26 02632, 2020

      • BrainzGit
        [listenbrainz-server] shivam-kapila closed pull request #707 (master…fix-develop.sh): Fix build and run spark containers https://github.com/metabrainz/listenbrainz-server…
      • 2020-01-26 02647, 2020

      • iliekcomputers
      • 2020-01-26 02621, 2020

      • iliekcomputers
        shivam-kapila: thanks, i feel we'll need to discuss our approach on develop.sh soon, now that we have two different things going on in one file.
      • 2020-01-26 02601, 2020

      • iliekcomputers
        ishaanshah[m]: what do you get when you go to http://0.0.0.0/static/import.js ?
      • 2020-01-26 02621, 2020

      • ishaanshah[m]
        page not found
      • 2020-01-26 02648, 2020

      • Wassabi joined the channel
      • 2020-01-26 02616, 2020

      • d4rkie has quit
      • 2020-01-26 02626, 2020

      • D4RK-PH0ENiX joined the channel
      • 2020-01-26 02638, 2020

      • iliekcomputers
        right.
      • 2020-01-26 02655, 2020

      • iliekcomputers
      • 2020-01-26 02602, 2020

      • iliekcomputers
        this is what we want, I think
      • 2020-01-26 02635, 2020

      • ishaanshah[m]
        Yep your right
      • 2020-01-26 02643, 2020

      • iliekcomputers
      • 2020-01-26 02606, 2020

      • iliekcomputers
        `get_static_url` might be linking the incorrect file
      • 2020-01-26 02627, 2020

      • ishaanshah[m]
        Yep
      • 2020-01-26 02653, 2020

      • ishaanshah[m]
        Should I use url_for instead
      • 2020-01-26 02645, 2020

      • iliekcomputers
        hmm, can we check what we use in the other pages which use compiled js
      • 2020-01-26 02638, 2020

      • iliekcomputers
      • 2020-01-26 02641, 2020

      • iliekcomputers
        interesting
      • 2020-01-26 02629, 2020

      • ishaanshah[m]
        Also its linking it to the correct file on my laptop
      • 2020-01-26 02643, 2020

      • ishaanshah[m]
        But not yours for some reason
      • 2020-01-26 02657, 2020

      • iliekcomputers
        that's very weird
      • 2020-01-26 02614, 2020

      • iliekcomputers
        do you have any uncommitted changes by any chance?
      • 2020-01-26 02636, 2020

      • ishaanshah[m]
        nope
      • 2020-01-26 02649, 2020

      • iliekcomputers
      • 2020-01-26 02617, 2020

      • iliekcomputers
        can we change this to `{% extends 'base-react.html' %}`
      • 2020-01-26 02629, 2020

      • iliekcomputers
        i think that might fix it
      • 2020-01-26 02635, 2020

      • iliekcomputers
        not completely sure
      • 2020-01-26 02640, 2020

      • iliekcomputers
        wait
      • 2020-01-26 02642, 2020

      • iliekcomputers
        probably not
      • 2020-01-26 02609, 2020

      • ishaanshah[m]
        But base-react is just adding react-props if I am not wrong
      • 2020-01-26 02613, 2020

      • iliekcomputers
        yep
      • 2020-01-26 02621, 2020

      • iliekcomputers
        yeah, let's just use url_for for now
      • 2020-01-26 02640, 2020

      • ishaanshah[m]
        Ok, cool
      • 2020-01-26 02655, 2020

      • ishaanshah[m]
        Can you change it in your copy and tell me
      • 2020-01-26 02605, 2020

      • ishaanshah[m]
        Coz it's already working for me
      • 2020-01-26 02627, 2020

      • Lisa761 joined the channel
      • 2020-01-26 02637, 2020

      • iliekcomputers
        sooo
      • 2020-01-26 02604, 2020

      • iliekcomputers
        I'm not sure if removing get_static_path would work
      • 2020-01-26 02627, 2020

      • iliekcomputers
      • 2020-01-26 02645, 2020

      • iliekcomputers
        it only makes one request for a main.{randomstring}.js
      • 2020-01-26 02605, 2020

      • iliekcomputers
        if we use url_for, it'll probably break in production
      • 2020-01-26 02620, 2020

      • iliekcomputers
        we need to investigate why get_static_path isn't linking correctly for me.
      • 2020-01-26 02627, 2020

      • ishaanshah[m]
        Hmm
      • 2020-01-26 02642, 2020

      • ishaanshah[m]
        Can you try rebuilding the container
      • 2020-01-26 02607, 2020

      • iliekcomputers
        hmm, sure
      • 2020-01-26 02616, 2020

      • iliekcomputers
        can you look where `get_static_path` is defined
      • 2020-01-26 02628, 2020

      • ishaanshah[m]
        sure
      • 2020-01-26 02603, 2020

      • ishaanshah[m]
        Ah
      • 2020-01-26 02605, 2020

      • ishaanshah[m]
        gotit
      • 2020-01-26 02621, 2020

      • ishaanshah[m]
        I guess import hasn't been added to your manifest
      • 2020-01-26 02603, 2020

      • Lisa761 has quit
      • 2020-01-26 02606, 2020

      • ishaanshah[m]
        Try adding it
      • 2020-01-26 02643, 2020

      • iliekcomputers
        what file
      • 2020-01-26 02648, 2020

      • iliekcomputers
        and what should I add?
      • 2020-01-26 02619, 2020

      • ishaanshah[m]
        manifest.json in static/js/dist
      • 2020-01-26 02628, 2020

      • ishaanshah[m]
        add "import.js": "import.js",
      • 2020-01-26 02655, 2020

      • iliekcomputers
        it exists already
      • 2020-01-26 02600, 2020

      • Guest55827 is now known as c1e0
      • 2020-01-26 02610, 2020

      • iliekcomputers
        manifest.json is autogenerated, yes?
      • 2020-01-26 02643, 2020

      • ishaanshah[m]
        ya it is
      • 2020-01-26 02606, 2020

      • ishaanshah[m]
        if you look at the get_static_path method
      • 2020-01-26 02646, 2020

      • ishaanshah[m]
        in static_manager.py
      • 2020-01-26 02651, 2020

      • ishaanshah[m]
        it returns the /static/file if it isn't defined in manifest
      • 2020-01-26 02645, 2020

      • iliekcomputers
        hmm, this is very weird.
      • 2020-01-26 02652, 2020

      • ishaanshah[m]
        What are you getting on this
      • 2020-01-26 02652, 2020

      • ishaanshah[m]
      • 2020-01-26 02625, 2020

      • iliekcomputers
      • 2020-01-26 02631, 2020

      • iliekcomputers
        wtf is this lol
      • 2020-01-26 02646, 2020

      • iliekcomputers
        soooo
      • 2020-01-26 02649, 2020

      • iliekcomputers
        i think i found the bug
      • 2020-01-26 02641, 2020

      • iliekcomputers
        i printed out manifest_content on this line: https://github.com/metabrainz/listenbrainz-server…
      • 2020-01-26 02654, 2020

      • iliekcomputers
        and it came up as undefined
      • 2020-01-26 02609, 2020

      • iliekcomputers
        we should add a `global manifest_content` before the check.
      • 2020-01-26 02614, 2020

      • iliekcomputers
        it fixes the problem for me.
      • 2020-01-26 02625, 2020

      • ishaanshah[m]
        ohk
      • 2020-01-26 02659, 2020

      • ishaanshah[m]
        But its wierd that main.js is working but import.js is not
      • 2020-01-26 02603, 2020

      • iliekcomputers
        but now it works for me even if i remove the `global` line wtf
      • 2020-01-26 02616, 2020

      • ishaanshah[m]
        Lol
      • 2020-01-26 02623, 2020

      • iliekcomputers
        I think we should investigate where `read_manifest` is called
      • 2020-01-26 02648, 2020

      • ishaanshah[m]
        Its called in init.py in webserbver
      • 2020-01-26 02653, 2020

      • ishaanshah[m]
        webserver*
      • 2020-01-26 02612, 2020

      • iliekcomputers
      • 2020-01-26 02615, 2020

      • iliekcomputers
        *shrugs*
      • 2020-01-26 02629, 2020

      • iliekcomputers
        so umm, i'm not sure what to make of this.
      • 2020-01-26 02651, 2020

      • iliekcomputers
        the only thing i've got is that we should add the `global manifest_content` line just to be safe.
      • 2020-01-26 02601, 2020

      • iliekcomputers
        and then when we deploy to beta, check that the page works.
      • 2020-01-26 02623, 2020

      • ishaanshah[m]
        Hmm
      • 2020-01-26 02629, 2020

      • iliekcomputers
        does that sound reasonable to you?
      • 2020-01-26 02649, 2020

      • ishaanshah[m]
        Ya, I think that should fix it.
      • 2020-01-26 02658, 2020

      • ishaanshah[m]
        Anyways, tell me if I need to change anything
      • 2020-01-26 02624, 2020

      • iliekcomputers
        hmm, i'm testing now.
      • 2020-01-26 02657, 2020

      • iliekcomputers
        the react import seems faster lol
      • 2020-01-26 02654, 2020

      • ishaanshah[m]
        I used the from option available in recenttracks
      • 2020-01-26 02634, 2020

      • ishaanshah[m]
        Initially all the pages were fetched and then compared wit the latest import time to decide whether to import or not
      • 2020-01-26 02606, 2020

      • iliekcomputers
        don't see any requests to submit-listens
      • 2020-01-26 02644, 2020

      • iliekcomputers
        yep, nothing's being imported.
      • 2020-01-26 02641, 2020

      • iliekcomputers
        which explains why it's parsing each page so fast, i guess :D
      • 2020-01-26 02626, 2020

      • iliekcomputers
        (and it seems to have started over after completing the 1455 pages)
      • 2020-01-26 02630, 2020

      • ishaanshah[m]
        Did you pull the latest changes that i made after your comments
      • 2020-01-26 02640, 2020

      • ishaanshah[m]
        Coz there was a bug which I fixed
      • 2020-01-26 02654, 2020

      • iliekcomputers
        i think i did.
      • 2020-01-26 02617, 2020

      • iliekcomputers
        i'm at `5af3bd3cc4e7b3f6d072a60c44b4d402c1750d76`
      • 2020-01-26 02659, 2020

      • ishaanshah[m]
        Yep thats the correct one
      • 2020-01-26 02625, 2020

      • iliekcomputers
        nvm, the listens were slow to come up, i think
      • 2020-01-26 02643, 2020

      • ishaanshah[m]
        Are you getting any errors in console
      • 2020-01-26 02654, 2020

      • iliekcomputers
        let me start over.
      • 2020-01-26 02604, 2020

      • iliekcomputers
        ishaanshah[m]: could you push some logging statements so that we can see what listens are being fetched and submitted to the API in the console
      • 2020-01-26 02612, 2020

      • iliekcomputers
        I think that will be helpful here.
      • 2020-01-26 02601, 2020

      • ishaanshah[m]
        Ok give 10 minutes
      • 2020-01-26 02615, 2020

      • ishaanshah[m]
        Not near my laptop
      • 2020-01-26 02648, 2020

      • ishaanshah[m]
        Also what is ur lastfm username
      • 2020-01-26 02657, 2020

      • ishaanshah[m]
        So that we get the same data
      • 2020-01-26 02658, 2020

      • iliekcomputers
        ishaanshah[m]: we can do this later if you're busy, no worries.
      • 2020-01-26 02612, 2020

      • ishaanshah[m]
        Nah its fine
      • 2020-01-26 02632, 2020

      • ishaanshah[m]
        Just went out to get a cup of coffee :D
      • 2020-01-26 02648, 2020

      • iliekcomputers
        wait
      • 2020-01-26 02657, 2020

      • iliekcomputers
        is it getting all of the pages and then sending them to LB?
      • 2020-01-26 02612, 2020

      • ishaanshah[m]
        Yep
      • 2020-01-26 02635, 2020

      • iliekcomputers
        that sounds ... unreasonable
      • 2020-01-26 02605, 2020

      • iliekcomputers
        we used to do get page 1 -> submit page 1 -> get next page
      • 2020-01-26 02620, 2020

      • iliekcomputers
        that way if the user has to stop the import in the middle, we still get some listens.