{"id":19704212,"url":"https://github.com/rimurudev/unity-ga-insecurehttpoption","last_synced_at":"2026-06-10T03:31:21.195Z","repository":{"id":250757680,"uuid":"835385173","full_name":"RimuruDev/Unity-GA-InsecureHttpOption","owner":"RimuruDev","description":"Unity GA | Job failed with exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---\u003e System.InvalidOperationException: Insecure connection not allowed at (wrapper managed-to-native) UnityEngine.Networking.UnityWebRequest.BeginWebRequest(UnityEngine.Networking.UnityWebRequest)   at UnityEn","archived":false,"fork":false,"pushed_at":"2024-07-29T18:25:57.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T17:21:36.461Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RimuruDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-29T18:14:39.000Z","updated_at":"2024-07-30T07:13:41.000Z","dependencies_parsed_at":"2024-07-30T00:24:14.823Z","dependency_job_id":"685423a3-0317-422f-a7a9-90fff6fc9a3c","html_url":"https://github.com/RimuruDev/Unity-GA-InsecureHttpOption","commit_stats":null,"previous_names":["rimurudev/unity-ga-insecurehttpoption"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/RimuruDev/Unity-GA-InsecureHttpOption","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RimuruDev%2FUnity-GA-InsecureHttpOption","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RimuruDev%2FUnity-GA-InsecureHttpOption/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RimuruDev%2FUnity-GA-InsecureHttpOption/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RimuruDev%2FUnity-GA-InsecureHttpOption/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RimuruDev","download_url":"https://codeload.github.com/RimuruDev/Unity-GA-InsecureHttpOption/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RimuruDev%2FUnity-GA-InsecureHttpOption/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34136112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T21:21:07.010Z","updated_at":"2026-06-10T03:31:21.177Z","avatar_url":"https://github.com/RimuruDev.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unity Game Analytics Insecure HTTP Option\n\nЭтот репозиторий содержит скрипты, которые решают проблему с ошибкой `Insecure connection not allowed` при использовании плагина GameAnalytics в Unity.\n\n## Проблема\n\nПри использовании плагина GameAnalytics в Unity может возникнуть следующая ошибка:\n\n```\nUnity GA | Job failed with exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---\u003e System.InvalidOperationException: Insecure connection not allowed\n```\n\n![___image_2024-07-29_18-44-26](https://github.com/user-attachments/assets/aad5768b-c5d0-4c13-8bba-bdb627e36529)\n\nПолный стектрейс:\n```\nUnity GA | Job failed with exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---\u003e System.InvalidOperationException: Insecure connection not allowed\nat (wrapper managed-to-native) UnityEngine.Networking.UnityWebRequest.BeginWebRequest(UnityEngine.Networking.UnityWebRequest)\n  at UnityEngine.Networking.UnityWebRequest.SendWebRequest () [0x00001] in /Users/bokken/build/output/unity/unity/Modules/UnityWebRequest/Public/UnityWebRequest.bindings.cs:289 \n  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception\u0026)\n  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in \u003cf06813fea36f4d329c559563c08ea387\u003e:0 \n   --- End of inner exception stack trace ---\n  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00083] in \u003cf06813fea36f4d329c559563c08ea387\u003e:0 \n  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in \u003cf06813fea36f4d329c559563c08ea387\u003e:0 \n  at Google.PortableWebRequest.StartRequest (Google.PortableWebRequest+HttpMethod method, System.String url, System.Collections.Generic.IDictionary`2[TKey,TValue] headers, UnityEngine.WWWForm form) [0x0019e] in /Users/chkuang/Workspace/git/unity-jar-resolver/source/VersionHandlerImpl/src/PortableWebRequest.cs:508 \n  at Google.PortableWebRequest+\u003cStartRequestOnMainThread\u003ec__AnonStorey6.\u003c\u003em__C () [0x00000] in /Users/chkuang/Workspace/git/unity-jar-resolver/source/VersionHandlerImpl/src/PortableWebRequest.cs:458 \n  at Google.RunOnMainThread.ExecuteNext () [0x0003d] in /Users/chkuang/Workspace/git/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:486 \nUnityEngine.Debug:LogError (object)\nGoogle.RunOnMainThread:ExecuteNext () (at /Users/chkuang/Workspace/git/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:488)\nGoogle.RunOnMainThread:\u003cExecuteAllUnnested\u003em__12 () (at /Users/chkuang/Workspace/git/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:536)\nGoogle.RunOnMainThread:RunAction (System.Action) (at /Users/chkuang/Workspace/git/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:343)\nGoogle.RunOnMainThread:ExecuteAllUnnested (bool) (at /Users/chkuang/Workspace/git/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:530)\nGoogle.RunOnMainThread:ExecuteAll () (at /Users/chkuang/Workspace/git/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:512)\nUnityEditor.EditorApplication:Internal_CallUpdateFunctions () (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorApplication.cs:381)\n```\n\nЭта ошибка возникает из-за настройки `insecureHttpOption` в файле `ProjectSettings.asset`. При значении `0` (по умолчанию) Unity не позволяет использовать небезопасные HTTP-соединения, что вызывает эту ошибку.\n\n## Решение\n\nДля устранения этой ошибки необходимо изменить значение `insecureHttpOption` на `1` в файле `ProjectSettings.asset`. В данном репозитории представлены два скрипта, которые помогут автоматизировать этот процесс:\n\n- **InsecureHttpOptionEditor**: Позволяет вручную изменить настройку через меню в Unity Editor.\n- **InsecureHttpOptionBuildHandler**: Автоматически изменяет настройку перед сборкой и восстанавливает её после завершения сборки.\n\n## Установка\n\n### Установка через Unity Package Manager\n\n1. Откройте `Packages/manifest.json`.\n2. Добавьте следующую строку в раздел `dependencies`:\n\n```json\n\"com.rimurudev.unity-ga-insecurehttpoption\": \"https://github.com/RimuruDev/Unity-GA-InsecureHttpOption.git\"\n```\n3. Или установите через Package Manager `\"https://github.com/RimuruDev/Unity-GA-InsecureHttpOption.git\"`\n4. Сохраните файл и откройте Unity. Пакет будет автоматически установлен.\n\n\u003cimg width=\"189\" alt=\"image\" src=\"https://github.com/user-attachments/assets/5cd9a59c-74db-4319-8a01-87f78b22769e\"\u003e\n\u003cimg width=\"474\" alt=\"image\" src=\"https://github.com/user-attachments/assets/634bd02c-4418-4674-8c39-3d0a893a859d\"\u003e\n\n\n### Установка из релиза\n\n1. Скачайте последний релиз из [Releases](https://github.com/RimuruDev/Unity-GA-InsecureHttpOption/releases).\n2. Распакуйте содержимое архива в папку `Assets/Plugins/RimuruDev/Unity-GA-InsecureHttpOption` вашего проекта.\n\n## Использование\n\n### В редакторе Unity\n\nДля ручного изменения настройки `insecureHttpOption` используйте меню в Unity:\n\n- **Set insecureHttpOption to 1**: `RimuruDev Tools/GA/Set insecureHttpOption to 1`\n- **Set insecureHttpOption to 0**: `RimuruDev Tools/GA/Set insecureHttpOption to 0`\n\n\u003cimg width=\"295\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a45f7c0f-91a9-4501-bd3b-e4de619c076e\"\u003e\n\n---\n\n\u003cimg width=\"435\" alt=\"image\" src=\"https://github.com/user-attachments/assets/bce70f26-e586-48bf-a2cb-1fea0f99f275\"\u003e\n\n### Автоматическая обработка при сборке\n\nСкрипт `InsecureHttpOptionBuildHandler` автоматически изменит значение `insecureHttpOption` на `1` перед сборкой и восстановит его на `0` после завершения сборки.\n\n## Вклад\n\nВаш вклад приветствуется! Если у вас есть предложения или исправления, создайте pull request или откройте issue.\n\n## Лицензия\n\nЭтот проект лицензирован под MIT License. Подробности см. в файле [LICENSE](LICENSE).\n\n---\n\nАвтор: RimuruDev\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frimurudev%2Funity-ga-insecurehttpoption","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frimurudev%2Funity-ga-insecurehttpoption","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frimurudev%2Funity-ga-insecurehttpoption/lists"}