Slice machine init behind corporate proxy

Hi all,

Maybe the question has already been asked, but i didn't find any answer matching my question.
I am trying to init a nextjs project with prismic slicemachine but when i run the command
npx @slicemachine/init --repository lpg-next
i have the followgin error :

Error! We failed to log you into your Prismic account
Run npx slicemachine init again!

I a m behind a corporate proxy, i tried without and it seems to be ok, but i would like to execute this at work behind the proxy. Is there any way to make it work ?

Thanks !

Hello team, the main problem would be if you can't log in to Prismic though the console. Maybe you'll need to use it outside of your internal network. Have you tried this?

Hi, thanks fir your answer.
I did try and i works. However, i need to execute this command on our internal network.
When i do this, a window appears asking me to login. On the terminal, i have :

:heavy_check_mark: Logged in as thomas.meurgey@***.

then nothing happens for a moment, and finally it fails with the error i mentionned above.

So it works outside of your network?
A workaround for the moment is to whitelist the specific URLs blocked by your internal network.

Hi. Same problem here. My corporate firewall admins definitely won't whitelist anything on the proxy server. That's how corporates usually work. I can access everything in the browser, so to enable this from the command line, surely this is just setting up the correct proxy settings, as with any other command line tool. Where does slicemachine get proxy infro from (if at all)?

Digging a bit deeper, this seems to be an issue with our ZScaler proxy that does SSL inspection and modifies the SSL chain. I've set the applicable NODE_TLS_REJECTED_UNAUTHORIZED and NODE_EXTRA_CA_CERTS environment variables but it's nto working.

I see you're using axios as the request library. But you're using a very old version of it (c. v0.27). Can I request that you upgrade it to the latest? Hopefully that solves it.

I can't provide an estimated time for when this could be implemented, but I can send this information to the Slice Machine team. Alternatively, you can also open an issue in the Slice Machine repository with this suggestion, that way the team can see it sooner. Thanks @igitur