What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
A Google Apps Script screenshot usually fails for one of four separate reasons: the project has not been authorized for every service it uses, a web app is running as the wrong identity or deployment, the browser is blocking Google’s sign-in storage, or the code is trying to photograph a dynamic interface instead of generating an image blob. Diagnose those classes separately. For charts, Slides images and fetched files, create a blob on the server; reserve browser capture for pages that genuinely require rendering.
Start with the failure class
Record the exact symptom, execution account, URL (including /dev or /exec), HTTP status and response type before changing code. A blank image is not proof of an OAuth problem: it can be an expired content URL, a blocked iframe, a deployment mismatch or an image larger than Sheets accepts.
| What you see | Most likely class | First check |
|---|---|---|
| “Authorization required,” blocked consent window, or code never reaches image logic | OAuth scopes or browser authentication | Run a function in the Apps Script editor and inspect browser cookie/storage errors |
/dev works but deployed URL is blank |
Deployment or execution identity | Test the published /exec deployment and its “execute as” setting |
| Image works in one browser, then fails in Sheets, Slides or another account | Requester-scoped, expiring URL or sharing | Fetch it while authorized and save a durable blob/file |
| Chart, iframe or loading page is blank in a browser capture | UI timing or wrong capture method | Export the object server-side instead of photographing the UI |
insertImage rejects an apparently valid source |
URL visibility or 2 MB blob limit | Check public accessibility, status, MIME type and blob size |
Fix authorization before debugging images
Apps Script scans your project for services and requests OAuth scopes when a function that needs them runs. Google’s authorization guide states: “If a script needs authorization, an authorization dialog appears when it is run.” Adding a service, changing code, revoking access, or denying a granular scope can leave the current grant incomplete.
- Save the project.
- In the Apps Script editor, select an ordinary function (not a trigger) and click Run.
- Choose the Google account that should own the execution, review the requested scopes and complete consent.
- Run the function again, then retry the screenshot path.
Installable triggers cannot display an interactive consent dialog. Authorize as the user who creates the trigger, then enable the trigger. If access was revoked, remove the project’s authorization in the Google Account security page and repeat the manual authorization flow. A selectively denied scope must also be granted before a service can read the file or fetch the resource.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Check web-app deployment and execution identity
A web app can execute as the user accessing it or as the account that deployed it. Those identities may have different Drive, Sheets and Slides permissions, so an image can appear for the owner and be blank or unauthorized for another user.
/dev is testing, not production
The /dev URL always runs the most recently saved code and is restricted to users with edit access. Google describes it as intended for testing during development. A deployed /exec URL runs the selected deployment version and its configured access policy.
Deployment checklist
- Open Deploy > Manage deployments and identify the URL and version you are actually calling.
- Confirm Execute as (owner or accessing user) and Who has access.
- Ensure the effective identity can read the source spreadsheet, presentation, Drive file and any remote resource.
- After changing code or manifest settings, create a new deployment version or update the existing deployment.
- Test the deployed URL in a clean account that represents a real user; do not infer production behavior from
/dev.
For a public endpoint that reads private files, executing as the owner may be appropriate, but it also means every authorization and sharing decision belongs to that owner. Executing as the accessing user is safer for per-user data but requires each user to grant access.
Repair browser authentication failures
OAuth can fail before your script starts. Google documents origin_mismatch when the browser host or port differs from the OAuth client’s registered JavaScript origin, and idpiframe_initialization_failed when third-party cookies or storage are blocked.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsRank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
- Match the browser origin exactly: scheme, host and port must equal the OAuth client’s allowed origin.
- Permit third-party cookies and site storage for Google sign-in, or add the documented exception for
accounts.google.com. - Retry in a clean browser profile or with only one Google account signed in. Multiple accounts can select the wrong identity.
- Check Workspace administrator policies. A domain can restrict Apps Script, Drive or external services even when the code is correct.
- Close stale consent pop-ups, reload the editor and start a fresh authorization attempt.
These fixes address browser policy and account context only. They do not change deployment permissions or repair an expired image URL.
Prefer server-side blobs to UI screenshots
A browser capture sees whatever is rendered at one moment: a loading spinner, permission page, iframe shell or blank canvas. Apps Script has direct export methods that avoid browser timing.
Charts in Sheets
Use the chart object’s server-side conversion:
function chartPng() {
const sheet = SpreadsheetApp.getActiveSheet();
const chart = sheet.getCharts()[0];
const blob = chart.getAs('image/png');
DriveApp.createFile(blob).setName('chart.png');
}
getAs('image/png') returns chart data as a blob converted to the requested type and adds the appropriate extension. getBlob() is also available where the chart’s native format is suitable.
Images in Google Slides
function slideImagePng() {
const presentation = SlidesApp.openById('PRESENTATION_ID');
const image = presentation.getSlides()[0].getImages()[0];
const blob = image.getAs('image/png');
DriveApp.createFile(blob).setName('slide-image.png');
}
Use image.getBlob() when you want the object’s existing image data. This avoids capturing the Slides editor, permissions UI or an iframe.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Remote image or page asset
function fetchImage() {
const url = 'https://example.com/image.png';
const response = UrlFetchApp.fetch(url, {muteHttpExceptions: true});
const status = response.getResponseCode();
if (status < 200 || status >= 300) {
throw new Error('Image request returned HTTP ' + status);
}
const type = response.getHeaders()['Content-Type'] || '';
if (!type.toLowerCase().startsWith('image/')) {
throw new Error('Expected an image, got ' + type);
}
DriveApp.createFile(response.getBlob()).setName('remote-image');
}
Inspect the status before calling getBlob(). A successful HTTP response can still be HTML (a login page, bot check or error document) rather than an image.
Handle temporary and private content URLs correctly
Slides getContentUrl() and Sheets cell-image content URLs are requester-tagged and expire after a short period. They can stop working when sharing changes. A URL that works immediately in your browser is therefore not a durable public asset.
- Generate or fetch the content while the script is authorized.
- Keep the returned blob in memory for the current operation, or persist it as a Drive file under controlled sharing.
- Regenerate the content URL when you need a fresh requester-scoped link.
- Never publish a temporary authenticated URL in a long-lived page, cache or document.
If a second account needs the image, grant that account access to the persisted file or expose a genuinely public, non-expiring asset. Do not “fix” a sharing problem by making an entire private document public.
Sheets insertion limits and choices
Sheets URL insertion and blob insertion have different rules. A URL source must be publicly accessible from the execution context. Blob insertion supports private authenticated content but has a documented maximum supported blob size of 2 MB.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
- For a public, durable image: verify the URL without a login, check its HTTP status and use URL insertion.
- For private content: fetch it with
UrlFetchAppand useinsertImage(blob, ...). - If a blob exceeds 2 MB, resize or compress it, or store a smaller derivative and insert that.
- Check the MIME type; an HTML error page saved with a
.pngname is still not an image.
When browser capture is still the right tool
Use a browser screenshot only when the target is a genuinely rendered web page that has no export API: for example, a complex dashboard assembled by JavaScript, a CSS layout, or a page whose visual state is the deliverable. Then wait for a selector, network idle or a known delay; set the correct viewport; and account for consent banners, login state, lazy images and cross-origin frames. A browser screenshot cannot bypass permissions or make a private URL permanent.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshooting by symptom
Blank or blocked consent window
Run a function manually, allow the required scopes, enable Google sign-in cookies/storage and retry with one account. If the popup reports origin_mismatch, correct the registered origin rather than changing script logic.
Owner sees the image; another user does not
Compare deployment identity, file sharing and the URL’s requester. Test the published /exec URL, not /dev, and redeploy after changes.
URL works in Chrome but not in Sheets
Check whether it requires your browser session, expires, redirects to HTML or is private. Fetch it with UrlFetchApp, inspect status and MIME type, then insert the resulting blob.
Insert fails for a valid-looking image
Confirm public accessibility for URL insertion or switch to a blob. Measure the blob and compress it below 2 MB. Verify that the response is an image, not a login or bot-check page.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Capture shows a spinner, iframe or blank canvas
Replace UI capture with getAs()/getBlob() for charts and Slides images. For an unavoidable web page, wait for a reliable selector or network idle and confirm the page is accessible to the capture identity.
Or skip the browser setup
ScreenshotNeo provides a website screenshot API and MCP server when the target is an arbitrary rendered page. It removes cookie/consent banners, newsletter popups and chat widgets before capture; bot checks, blank pages and failed loads are never billed. Its MCP server lets Claude, Cursor and other MCP clients call take_screenshot, get_page_info and capture_pdf. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots.
One-call example (see the ScreenshotNeo documentation):
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
Responses identify the page verdict and billing status with X-Page-Verdict and X-Billed headers. Sign up free for 1,000 screenshots a month with no card.
Frequently Asked Questions
Should I reset OAuth permissions every time a screenshot fails?
No. First run the function manually and inspect the exact authorization or browser error. Reset permissions only when access was revoked or the granted scopes no longer match the project.
Can a public Apps Script web app read any private Drive image?
Only if its effective execution identity has permission to read that file. Public access to the endpoint does not automatically grant access to private Drive content.
How can I tell whether a downloaded “PNG” is really an image?
Check the HTTP status, Content-Type header and, when practical, the file signature. Login, consent and bot-check pages commonly return HTML with an image-looking filename.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

