[bookbrainz-utils] 14dependabot[bot] closed pull request #27 (03master…dependabot/npm_and_yarn/cleaner/y18n-3.2.2): chore(deps): bump y18n from 3.2.1 to 3.2.2 in /cleaner https://github.com/metabrainz/bookbrainz-utils/...
monkey[m]
(quite obviously :D )
BrainzGit
[bookbrainz-utils] 14dependabot[bot] closed pull request #38 (03master…dependabot/npm_and_yarn/cleaner/thenify-3.3.1): chore(deps): bump thenify from 3.3.0 to 3.3.1 in /cleaner https://github.com/metabrainz/bookbrainz-utils/...
[bookbrainz-utils] 14MonkeyDo merged pull request #31 (03master…dependabot/npm_and_yarn/cleaner/hosted-git-info-2.8.9): chore(deps): bump hosted-git-info from 2.7.1 to 2.8.9 in /cleaner https://github.com/metabrainz/bookbrainz-utils/...
lucifer[m]
so i have been reading through the un-uglified musickit.js source (its still ugly uhhh) and i have figured out how to reuse auth tokens across devices.
also, i found out endpoints to renew and revoke the auth tokens.
monkey[m]
Oh? Non-documented endpoints huh?
lucifer[m]
yes.
the issue however is that if the token is expired and we supply it to musickit instance. we get something like this
lucifer[m] uploaded an image: (5KiB) < https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/yjaSSoRqNalNijGEllVYfCBy/image.png >
monkey[m]
Beautiful
lucifer[m]
MusicKit makes an API call to an undocumented API and if the response is a 403 error we get the above.
so i was wondering if we could call the undocumented API ourselves before loading musickit and manually ask user to reconnect their account.
monkey[m]
Right. We could do that call separately and catch 403s, then refresh the token before passing it to MK
Bingo bango
lucifer[m]
right that, the only apprehension i have is that we might have a slight slowdown if we do that everytime.
monkey[m]
It's an extra api call, but frankly, looking at how many calls these JS kits do, it's a drop oin the ocean
lucifer[m]
basically the first track is loaded slower because of this extra call.
maybe we could do it as soon as we load the page?
without waiting for the user to play anything.
as we are now in a SPA, the number of API calls are reduced anyway.
monkey[m]
Provided the apple music player is enabled in the user settings, that might be wise
lucifer[m]
yup of course.
monkey[m]
So I guess to be implemented in the AppleMusic component of BrainzPlayer, on setup?
lucifer[m]
i think that would make sense, yes.
monkey[m]
That all seems reasonable, for the comfort of the user. What happens if we get a 403? Do we get the user to reconnect immediately?
Or just remove the token from DB and front-end globalcontext, then wait for an interaction with the applemusic player?
monkey[m]: > <@monkey:chatbrainz.org> That all seems reasonable, for the comfort of the user. What happens if we get a 403? Do we get the user to reconnect immediately?
> Or just remove the token from DB and front-end globalcontext, then wait for an interaction with the applemusic player?
I think retry with the undocumented refresh endpoint once and then ask the user to reconnect.
monkey[m]
OK
lucifer[m]
the issue is that music-user-tokens are always valid for 6 months iiuc so i cannot test the renew endpoint until 6 months.
it just returns the existing token at the moment.
monkey[m]
Lol
I guess put it in the calendar? :D
lucifer[m]
i'll do that lol
ansh[m] joined the channel
ansh[m]
<lucifer[m]> "MusicKit makes an API call to an..." <- Hi! Can you please share the API URL and the request structure?
lucifer[m]
ansh[m]: ansh: yes, i'll leave a detailed comment on your PR.
d4rkie joined the channel
d4rkie has quit
d4rkie joined the channel
d4rkie has quit
monkey: ansh: i found the way to disable dialog (again undocumented). i have left a comment on the PR. for now, let's just redirect the user to redo auth instead of trying for manual refresh. as i want to add refresh token on backend.
lossleader[m]1 has quit
* refresh token functionality on backend.
mayhem: stripe error is not transient, an issue with our code. i'll try to debug what happened that it broke all of a sudden.
mayhem[m]
Odd. While you're there, we can accept EUR payments, can we set that up?
bitmap, zas hi! sentry seems to be broken. i can't see any data in there in any project. not sure if its a ui issue or the data is entirely lost. if so, maybe we should do a clean reinstall.
bitmap[m]
I did a clean reinstall recently (restoring only a partial backup, so new issues were saved), but looks like it self-borked again
it was working for a while but I hadn't checked it in a couple of weeks
s/new/no/
Jade[m] joined the channel
Jade[m]
I'm having issues with pushing to github right now, is it just me?
Hanging when I try to push over SSH
It's working now...
lucifer[m]
<bitmap[m]> "I did a clean reinstall recently..." <- i see
the DSNs are still unchanged though? maybe we should a clean reinstall with creating projects from scratch as well.
a bit of nuisance but might be better in the longer term.
oh it seems to have started working just now
bitmap[m]
yeah, DSNs were preserved
oh, I restarted the compose project like 10 minutes ago, maybe that helped? there are still a ton of errors on the logs though
s/on/in/
all previous issues are still gone
lucifer[m]
mayhem: can you log into stripe and find the webhook data that triggered the failure?
Given they're entirely broken as of now and the fix is trivial, it seems tempting to do it in one go, but if either of you prefers to do it 1k a day I can do that
It's apparently National Video Game Day in the US, but since I'm in Europe I'm stuck dealing with you lot
I have 3 mailed in reviews:
ericd says: 'This week improved previous implemented feeds and also add stats feeds. Next week I will mostly do more tests with these feeds, before merging them!'
mayhem says:
'''
I've been having a rough time post-covid, with my sleep being significantly impacted. All last week, I felt like a zombie and not capable of doing much. While my sleep is slowly improving, I'm not out of the woods yet.
That said, last week was minimal work for all critical tasks to run the foundation, but not a whole lot more. Today I will try and get on top of the pending PRs, but then spend a lot more time in the sun which does seem to help my sleep.
Sorry for my absence, but this situation really sucks.
'''
Get better, mayhem!
monkey[m]
Ditto
LupinIII
god bedreing!
🙄
god *bedring
reosarevok[m]
And aerozol says:
'''
Mainly busy with other client work, but spent a little bit of time getting a potential ‘products’ view out of my brain: MBS-13680