Have you ever thought of backing up your icloud photos to your own disk? Well, i haven’t found tools to do this job yet. I spent few hours to see how ICloud photos works via web interfaces. It’s pretty simple, it use some APIs to pull your photos library information. Can you use a script instead of via Web? yes, you can , you need to get the cookies and paste it to your script. It’s interesting that once you have the cookie you can query from any place – Apple does not check the IP , it just check the cookies only.  So, ifRead More →

  I was struggling with the client certificate with Puppeteer. Can you use client certificate for authentication? Yes, you can , but you have to do 3 things: Run the puppeteer in normal mode (headlesss=false) Import the certificate to your profile , you need a certificate file in pfx format , this is my script to import echo “Importing certificate” mkdir -p $HOME/.pki/nssdb certutil -d sql:$HOME/.pki/nssdb -N –empty-password certutil -d sql:$HOME/.pki/nssdb -L pk12util -d sql:$HOME/.pki/nssdb -i /config/cert.pfx -W “” Update the policy: /etc/chromium/policies/managed/policy.json ( if you using Chrome, then it should be /etc/opt/chrome/policies/managed/policy.json) Here is my sample file:   { “AutoSelectCertificateForUrls”: [“{\”pattern\”:\”\”,\”filter\”:{}}”] , “AuthServerWhitelist”: “.org”,Read More →

If you run a puppeteer script with docker and the docker was hang. It’s probably because your browser is still running, you might have some exceptions that cause your script never reaches to the line where you close the browser. We need to make sure that these lines below should be always run at the end: //await har.stop(); //if you collect har file await browser.close(); //process.exit(0);Read More →

When you run puppeteer, you can either to run it in headless mode or normal mode, headless is a little bit faster. Which one you should use? In my case , i select them for a few reason: Normal mode: i need to load a chrome extension to do fix the NTLM authentication Headless mode: i use it since, we have a site using certificate authentication, it has a popup. i couldn’t find a way to get rid of that certificate menu. Running in headless mode force Chrome to not authenticate with certificate.Read More →

We upgraded our puppeteer to v97 and had a challenge with one application , the application show this error when i use the latest version. IDX21323: RequireNonce is ‘System.Boolean’. OpenIdConnectProtocolValidationContext.Nonce was null, OpenIdConnectProtocol.ValidatedIdToken.Payload.Nonce was not null. The nonce cannot be validated. If you don’t need to check the nonce, set OpenIdConnectProtocolValidator.RequireNonce to ‘false’. Note if a ‘nonce’ is found it will be evaluated. It turned out Google chrome has a new flag to manage the cookies. it’s the “samesite” flag. I finaly fix by changing our chrome launch parameter, see the change i bold below: const browser = await puppeteer.launch({headless:false,ignoreHTTPSErrors: true,ignoreDefaultArgs: [“–disable-extensions”,”–enable-automation”], args:[‘–no-sandbox’,’load-extension=/config/chrome-ntlm-ext/’, ‘–disable-extensions-except=/config/chrome-ntlm-ext/’, ‘–disable-features=SameSiteByDefaultCookies’,Read More →

I have an old Mac Pro 2010. This machine does not have internet recovery. I replaced the hard drive, so i need a to boot from USB to start the installation. The process seems easily with the documentation from Apple: https://support.apple.com/en-us/HT201372 I followed the documentation, everything looks good no error. But when i press “Option” to select USB disk , my USB is not displayed, i tried with different working Mac OS, none of them show the USB as a bootable device. I finally found https://diskmakerx.com/ , it works perfectly.Read More →