Safari Developer Tools

RSS for tag

Inspect, edit, debug, and check the performance of your web content using Safari developer tools.

Posts under Safari Developer Tools tag

200 Posts

Post

Replies

Boosts

Views

Activity

Bug report for ios16.0.2
Maybe it's only the Japanese version of the iPhone. Safari and the page will solidify when you press "Original Password" from "Other Options" in the automatic password creation function. Also, if you go to another application while typing in the input box, Safari and pages will not work. I'm in a lot of trouble, so please fix it as soon as possible. By the way, the terminal is iPhone 12pro.
3
0
2.3k
Sep ’22
How to debug "A problem repeatedly occurred"
Some of our users came across this "A problem repeatedly occurred" issue when they were trying to access our site on Safari on iOS 15.6.1. I tried to use an iOS simulator on XCode to replicate this issue but I couldn't find a simulator for iOS 15.6.1 on my XCode but only one for iOS 15.5. My questions are: How to get an iOS 15.6.1 simulator on XCode? Once I replicate this issue on a simulator, is there a way to debug this? Or is using a simulator the best way to debug this issue?
0
0
886
Sep ’22
Private Click Measurement - not getting attribution report
So I created two simple websites just to test out private click measurement. On one website (hosted on herokuapp) I am showing an advertisement, upon clicking which the user is redirected to another website (hosted on onrender) where the user needs to click a button for the conversion/attribution to happen. Now the first two steps are happening correctly as can be seen from the screenshot below, but I am not getting the attribution report on the POST endpoint /.well-known/private-click-measurement/trigger-attribution/:triggerId, or for that matter any endpoint as I am logging the requests coming to any of the endpoints on the first website. I have followed the PCM documentation for setting up everything. Here is the screenshot of the console log: The different endpoints on the first website:
0
0
1.3k
Sep ’22
Private Click Measurement(PCM) debugging
Summary We are currently working on end to end testing Apple’s Private Click Measurement. PCM is divided into 3 steps, where the 3rd step involves Safari storing the conversion and sending it to our endpoint https://www.example.com/.well-known/private-click-measurement/report-attribution/ after a random delay. We have verified that steps 1 and 2 are working E2E, but when we get to step 3, we don’t observe Safari making the request to our endpoint. Detail Using Safari Technology Preview, we can observe the network requests from Mobile Safari. To test PCM, we turned on “Private Click Measurement Debug Mode” and  opened a test Ad on the mobile device. We then triggered a conversion, and observed the output in the network/console tabs.  Here is the output on the network tab: And here is the output from the console: Note that we see “[Private Click Measurement] Triggering Event Accepted,” in the console, which seemed to suggest that the Step 2 Data was accepted and that Safari should send the conversion to step 3. Since PCM Debug Mode is on, we should see the request to our Step 3 endpoint in 10 seconds. However, our sniffer(Charles) didn't detect any traffic to the attribution URL(https://www.example.com/.well-known/private-click-measurement/report-attribution/). The above is reproduced consistently. Any idea how can we debug further?
1
0
3.8k
Sep ’22
Safari blocks cookies when sending data from a child window to a used window that is inside an iframe in the window.opener.postMessage collection.
Hi all. I am a software developer and while developing one of the products (it is a plugin for outlook & outreach) I encountered such a problem. Safari disables cookies when sending data from a child window to a parent window that is inside an iframe when using window.opener.postMessage. My plugin (React app) works inside iFrame and in order to implement SSO login and not get a block from Azur, I had to create a separate window with SSO login, where the login procedure takes place. After that, the window is closed, and the data required for login, including cookies, is sent to the parent window. The parent window is in an iFrame. For this operation I use window.open - to open a child window and window.opener.postMessage. - to send data from a child window to a parent window. parent const SSOWindowOpen = () => { const left = (screen.width - 465 ) / 2 const top = (screen.height - 650 ) / 4 const SSOWindow = window.open('/app/static/integrations/ssoWindow', 'SSOWindow', 'resizable=yes, width=' + 465 + ', height=' + 650 + ', top=' + top + ', left=' + left); window.addEventListener('message', function(e) { SSOFunction(e.data) }, false); } Childe if (SSOToken) { window.opener.postMessage({token: SSOToken}, '/'); window.close(); } }, [SSOToken]) Tell me, is there a way to solve this problem in a different way or to avoid this blocking? This error does not reproduce in the Chrome browser.
0
1
1.3k
Aug ’22
Publish or test mini sites locally in Safari browser with relative source references iPad iOS 15.x and higher
Project goal:  Publish on iPad html/css static multi page site, external style sheet, images, and maybe animated GIF clips or very short videos. This would get pushed to about 14,000 users for viewing and not require them any technical hoops to utilize. This must run offline from iPad Files storage no calls to server. Problem: Apple at some point disabled the ability to open local files in Safari. This means you cannot open an HTML file with relative src references such as <img src="test-image.png" alt="grrrrrr" /> You can only "open" or view the file via the Files app on iPad. I have tried changing advanced settings , disable local file restrictions etc for at least previewing my own work via developer mode, cabled iPad as an exercise in futility. Current Project state and or Limitation: "Publish" or saved single file HTML document to the iPad. View file in Safari - Unable not allowed File-name.html view via iOS Files app  Files app renders the html file with only the internal text and internal header contained CSS styling. Files app fails to load all relative source references such as  <img src="test-image.png" alt="grrrrrr" /> This is a huge roadblock to an otherwise simple project. Has someone built an iPadOS WebKit or Gecko app that will load and run a static site essentially just like any browser normally would on MacOS desktop environment ? Launch app | import site project folder/sub-folders | loads index.htm | renders and runs site A MacOS application that would essentially export a whole multi page mini site as a webarchive if you will that Safari on iPad would render correctly ? Maybe some Adobe Acrobat Pro functionality and or InDesign etc that would export some type of PDF chunk that would render as planned either in Safari or Acrobat Reader just like it should in the first place.....
1
0
1.1k
Jul ’22
Couldn't add Javascript code to iOS safari extension app
I am building a safari extension app. the code(html, css, javascript) for the safari extension that is in the AppExtension directory works good, but when I added button to Main.html to make an Action, to make the app dynamically change (the application itself not the extension), and I want to send data from the app to the extension on Safari. Could anyone help me to fix this issue. This my html code: <!--Main.html --> <!DOCTYPE html> <html> <head>     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">     <meta http-equiv="Content-Security-Policy" content="default-src 'self'">     <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">     <link rel="stylesheet" href="../Style.css">     <script src="../Script.js" defer></script> </head> <body> <!--The makeAction() function is defined in the `Script.js` file -->         <button onclick="makeAction()">Dropdown</button> </body> </html> And this is the files structure
1
1
1.3k
Jul ’22
Bug report for ios16.0.2
Maybe it's only the Japanese version of the iPhone. Safari and the page will solidify when you press "Original Password" from "Other Options" in the automatic password creation function. Also, if you go to another application while typing in the input box, Safari and pages will not work. I'm in a lot of trouble, so please fix it as soon as possible. By the way, the terminal is iPhone 12pro.
Replies
3
Boosts
0
Views
2.3k
Activity
Sep ’22
How to debug "A problem repeatedly occurred"
Some of our users came across this "A problem repeatedly occurred" issue when they were trying to access our site on Safari on iOS 15.6.1. I tried to use an iOS simulator on XCode to replicate this issue but I couldn't find a simulator for iOS 15.6.1 on my XCode but only one for iOS 15.5. My questions are: How to get an iOS 15.6.1 simulator on XCode? Once I replicate this issue on a simulator, is there a way to debug this? Or is using a simulator the best way to debug this issue?
Replies
0
Boosts
0
Views
886
Activity
Sep ’22
Private Click Measurement - not getting attribution report
So I created two simple websites just to test out private click measurement. On one website (hosted on herokuapp) I am showing an advertisement, upon clicking which the user is redirected to another website (hosted on onrender) where the user needs to click a button for the conversion/attribution to happen. Now the first two steps are happening correctly as can be seen from the screenshot below, but I am not getting the attribution report on the POST endpoint /.well-known/private-click-measurement/trigger-attribution/:triggerId, or for that matter any endpoint as I am logging the requests coming to any of the endpoints on the first website. I have followed the PCM documentation for setting up everything. Here is the screenshot of the console log: The different endpoints on the first website:
Replies
0
Boosts
0
Views
1.3k
Activity
Sep ’22
Private Click Measurement(PCM) debugging
Summary We are currently working on end to end testing Apple’s Private Click Measurement. PCM is divided into 3 steps, where the 3rd step involves Safari storing the conversion and sending it to our endpoint https://www.example.com/.well-known/private-click-measurement/report-attribution/ after a random delay. We have verified that steps 1 and 2 are working E2E, but when we get to step 3, we don’t observe Safari making the request to our endpoint. Detail Using Safari Technology Preview, we can observe the network requests from Mobile Safari. To test PCM, we turned on “Private Click Measurement Debug Mode” and  opened a test Ad on the mobile device. We then triggered a conversion, and observed the output in the network/console tabs.  Here is the output on the network tab: And here is the output from the console: Note that we see “[Private Click Measurement] Triggering Event Accepted,” in the console, which seemed to suggest that the Step 2 Data was accepted and that Safari should send the conversion to step 3. Since PCM Debug Mode is on, we should see the request to our Step 3 endpoint in 10 seconds. However, our sniffer(Charles) didn't detect any traffic to the attribution URL(https://www.example.com/.well-known/private-click-measurement/report-attribution/). The above is reproduced consistently. Any idea how can we debug further?
Replies
1
Boosts
0
Views
3.8k
Activity
Sep ’22
Safari blocks cookies when sending data from a child window to a used window that is inside an iframe in the window.opener.postMessage collection.
Hi all. I am a software developer and while developing one of the products (it is a plugin for outlook & outreach) I encountered such a problem. Safari disables cookies when sending data from a child window to a parent window that is inside an iframe when using window.opener.postMessage. My plugin (React app) works inside iFrame and in order to implement SSO login and not get a block from Azur, I had to create a separate window with SSO login, where the login procedure takes place. After that, the window is closed, and the data required for login, including cookies, is sent to the parent window. The parent window is in an iFrame. For this operation I use window.open - to open a child window and window.opener.postMessage. - to send data from a child window to a parent window. parent const SSOWindowOpen = () => { const left = (screen.width - 465 ) / 2 const top = (screen.height - 650 ) / 4 const SSOWindow = window.open('/app/static/integrations/ssoWindow', 'SSOWindow', 'resizable=yes, width=' + 465 + ', height=' + 650 + ', top=' + top + ', left=' + left); window.addEventListener('message', function(e) { SSOFunction(e.data) }, false); } Childe if (SSOToken) { window.opener.postMessage({token: SSOToken}, '/'); window.close(); } }, [SSOToken]) Tell me, is there a way to solve this problem in a different way or to avoid this blocking? This error does not reproduce in the Chrome browser.
Replies
0
Boosts
1
Views
1.3k
Activity
Aug ’22
web inspector disconnecting
Safari 11.0.1/MacOS 10.13.1 is unable to maintain a web inspector connection with a web page on Safari iOS - iPhone 6, iOS 11.1.1. Almost immediate after the Web Inspector window opens, the connection is dropped and the window is basically dead.
Replies
24
Boosts
0
Views
20k
Activity
Aug ’22
Cookie is not inserted for XMLHttpRequest
Hi, I have the below scenario, 1.While accessing Index.html, server inserts a cookie and a JS file (request.js) 2 . request.js file collects some safari properties and posting it to the same web server like below, but during this call my cookie is missing. Can you please help? I want to retain my cookie value for the JS initiated request.
Replies
0
Boosts
0
Views
516
Activity
Aug ’22
Unable to use google services on my website from IOS USA
Hey, I'm trying to use the Google services in my MERN project. like (google authentication, send mail by nodemailer with google) but it's working for all devices except the IOS devices in the USA. I tried to inspect the response with the Safari web inspector and got this response. How can I fix this issue?
Replies
0
Boosts
0
Views
451
Activity
Jul ’22
Is it possible to inspect a page on iPhone using iPad Pro M1?
This is the last question I have to buy an iPad Pro. At the moment I only need to debug web pages in safari, but it would be ideal to also be able to debug applications. An alternative and very useful solution is the safari on the iPad Pro to have an inspection tool like in Chrome or Safari for desktop...
Replies
0
Boosts
0
Views
1.5k
Activity
Jul ’22
Publish or test mini sites locally in Safari browser with relative source references iPad iOS 15.x and higher
Project goal:  Publish on iPad html/css static multi page site, external style sheet, images, and maybe animated GIF clips or very short videos. This would get pushed to about 14,000 users for viewing and not require them any technical hoops to utilize. This must run offline from iPad Files storage no calls to server. Problem: Apple at some point disabled the ability to open local files in Safari. This means you cannot open an HTML file with relative src references such as <img src="test-image.png" alt="grrrrrr" /> You can only "open" or view the file via the Files app on iPad. I have tried changing advanced settings , disable local file restrictions etc for at least previewing my own work via developer mode, cabled iPad as an exercise in futility. Current Project state and or Limitation: "Publish" or saved single file HTML document to the iPad. View file in Safari - Unable not allowed File-name.html view via iOS Files app  Files app renders the html file with only the internal text and internal header contained CSS styling. Files app fails to load all relative source references such as  <img src="test-image.png" alt="grrrrrr" /> This is a huge roadblock to an otherwise simple project. Has someone built an iPadOS WebKit or Gecko app that will load and run a static site essentially just like any browser normally would on MacOS desktop environment ? Launch app | import site project folder/sub-folders | loads index.htm | renders and runs site A MacOS application that would essentially export a whole multi page mini site as a webarchive if you will that Safari on iPad would render correctly ? Maybe some Adobe Acrobat Pro functionality and or InDesign etc that would export some type of PDF chunk that would render as planned either in Safari or Acrobat Reader just like it should in the first place.....
Replies
1
Boosts
0
Views
1.1k
Activity
Jul ’22
Couldn't add Javascript code to iOS safari extension app
I am building a safari extension app. the code(html, css, javascript) for the safari extension that is in the AppExtension directory works good, but when I added button to Main.html to make an Action, to make the app dynamically change (the application itself not the extension), and I want to send data from the app to the extension on Safari. Could anyone help me to fix this issue. This my html code: <!--Main.html --> <!DOCTYPE html> <html> <head>     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">     <meta http-equiv="Content-Security-Policy" content="default-src 'self'">     <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">     <link rel="stylesheet" href="../Style.css">     <script src="../Script.js" defer></script> </head> <body> <!--The makeAction() function is defined in the `Script.js` file -->         <button onclick="makeAction()">Dropdown</button> </body> </html> And this is the files structure
Replies
1
Boosts
1
Views
1.3k
Activity
Jul ’22