אם במסך ההסכמה של OAuth מוצגת האזהרה 'האפליקציה הזו לא אומתה', סימן שהאפליקציה מבקשת היקפי הרשאות שמאפשרים גישה לנתונים רגישים של משתמשים. אם האפליקציה שלכם משתמשת בהיקפי גישה רגישים, היא צריכה לעבור את תהליך האימות כדי להסיר את האזהרה הזו ומגבלות אחרות. במהלך שלב הפיתוח, אפשר להמשיך מעבר לאזהרה הזו על ידי בחירה באפשרות מתקדם > מעבר אל {שם הפרויקט} (לא בטוח).
File not found error for credentials.json
כשמריצים את דוגמת הקוד, יכול להיות שתופיע הודעת השגיאה 'הקובץ לא נמצא' או 'אין קובץ כזה' לגבי credentials.json.
השגיאה הזו מתרחשת כשלא אישרתם את פרטי הכניסה של אפליקציית שולחן העבודה. במאמר יצירת פרטי כניסה מוסבר איך ליצור פרטי כניסה לאפליקציה למחשב.
אחרי שיוצרים את פרטי הכניסה, מוודאים שקובץ ה-JSON שהורדתם נשמר בשם credentials.json. לאחר מכן מעבירים את הקובץ לספריית העבודה.
Token has been expired or revoked
כשמריצים את דוגמת הקוד, יכול להיות שתקבלו את הודעת השגיאה Token has been expired (פג התוקף של האסימון) או Token has been revoked (האסימון בוטל).
השגיאה הזו מתרחשת כשפג התוקף של טוקן גישה משרת ההרשאות של Google או כשהוא בוטל. מידע על סיבות אפשריות ופתרונות זמין במאמר פג תוקף של אסימון רענון.
שגיאות JavaScript
Error: origin_mismatch
השגיאה הזו מתרחשת במהלך תהליך ההרשאה אם המארח והיציאה שמשמשים להצגת דף האינטרנט לא תואמים למקור JavaScript מותר בפרויקט שלכם ב-Google Cloud Console. חשוב לוודא שהגדרתם מקור JavaScript מורשה ושה-URL בדפדפן תואם לכתובת ה-URL של המקור.
idpiframe_initialization_failed: Failed to read the 'localStorage' property from 'Window'
השגיאה הזו מתרחשת כשקובצי Cookie של צד שלישי ואחסון נתונים לא מופעלים בדפדפן. האפשרויות האלה נדרשות על ידי ספריית הכניסה לחשבון Google. מידע נוסף זמין במאמר בנושא קובצי Cookie של צד שלישי ואחסון נתונים.
idpiframe_initialization_failed: Not a valid origin for the client
השגיאה הזו מתרחשת כשהדומיין שרשום לא תואם לדומיין שמשמש לאירוח דף האינטרנט. חשוב לוודא שהמקור שרשמתם זהה לכתובת ה-URL בדפדפן.
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-08-29 (שעון UTC)."],[],[],null,["# Errors with authentication, authorization, and JavaScript\n\nThis page describes some common error messages, issues, and remedies which\nare not strictly related to the Classroom API, organized by error types:\n\n- [Authentication \\& authorization errors](#authentication-authorization)\n- [JavaScript errors](#javascript-errors)\n\nAuthentication and authorization errors\n---------------------------------------\n\n`This app isn't verified`\n-------------------------\n\nIf the OAuth consent screen displays the warning \"This app isn't verified,\" your\napp is requesting scopes that provide access to sensitive user data. If your\napplication uses sensitive scopes, your app must go through the\n[verification process](https://support.google.com/cloud/answer/7454865)\nto remove that warning and other limitations. During the development phase, you\ncan continue past this warning by selecting **Advanced \\\u003e Go to {Project Name}\n(unsafe)**.\n\n`File not found error for credentials.json`\n-------------------------------------------\n\nWhen running the code sample, you might receive a \"file not found\" or \"no such\nfile\" error message regarding credentials.json.\n\nThis error occurs when you have not authorized the desktop application\ncredentials. To learn how to create credentials\nfor a desktop application, go to\n[Create credentials](/workspace/guides/create-credentials#desktop-app).\n\nAfter you create the credentials, make sure the downloaded JSON file is saved as\n`credentials.json`. Then move the file to your working directory.\n\n`Token has been expired or revoked`\n-----------------------------------\n\nWhen running the code sample, you might receive a \"Token has been expired\" or\n\"Token has been revoked\" error message.\n\nThis error occurs when an access token from the Google Authorization Server has\neither expired or has been revoked. For information about potential causes\nand fixes, see\n[Refresh token expiration](/identity/protocols/oauth2#expiration).\n\nJavaScript errors\n-----------------\n\n### `Error: origin_mismatch`\n\nThis error occurs during the authorization flow if the host and port used\nto serve the web page doesn't match an allowed JavaScript origin on your\nGoogle Cloud console project. Make sure you set an authorized\nJavaScript origin and that the URL in your browser matches the origin URL.\n\n### `idpiframe_initialization_failed: Failed to read the 'localStorage' property from 'Window'`\n\nThis error occurs when third-party cookies and data storage aren't enabled\nin your browser. These options are required by the Google Sign-in library. For\nmore information, see\n[3rd-party cookies and data storage](https://developers.google.com/identity/sign-in/web/troubleshooting#third-party_cookies_and_data_blocked).\n| **Note:** In your own app, you should prompt users to enable third-party cookies and data storage or add an exception for `accounts.google.com`.\n\n### `idpiframe_initialization_failed: Not a valid origin for the client`\n\nThis error occurs when the domain registered doesn't match the domain being\nused to host the web page. Ensure that the origin you registered matches the URL\nin the browser."]]