{"action":"created","issue":{"url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/2605","repository_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps","labels_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/2605/labels{/name}","comments_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/2605/comments","events_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/2605/events","html_url":"https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/2605","id":435930815,"node_id":"MDU6SXNzdWU0MzU5MzA4MTU=","number":2605,"title":"iOS app terminated by GMSThreadException when marker url isn't valid","user":{"login":"eltaiguer","id":8492873,"node_id":"MDQ6VXNlcjg0OTI4NzM=","avatar_url":"https://avatars1.githubusercontent.com/u/8492873?v=4","gravatar_id":"","url":"https://api.github.com/users/eltaiguer","html_url":"https://github.com/eltaiguer","followers_url":"https://api.github.com/users/eltaiguer/followers","following_url":"https://api.github.com/users/eltaiguer/following{/other_user}","gists_url":"https://api.github.com/users/eltaiguer/gists{/gist_id}","starred_url":"https://api.github.com/users/eltaiguer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eltaiguer/subscriptions","organizations_url":"https://api.github.com/users/eltaiguer/orgs","repos_url":"https://api.github.com/users/eltaiguer/repos","events_url":"https://api.github.com/users/eltaiguer/events{/privacy}","received_events_url":"https://api.github.com/users/eltaiguer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2019-04-22T23:16:07Z","updated_at":"2019-04-22T23:59:32Z","closed_at":null,"author_association":"NONE","body":"**I'm submitting a ...**  (check one with \"x\")\r\n- [ ] question\r\n- [X] any problem or bug report\r\n\r\n**OS:**  (check one with \"x\")\r\n- [ ] **Android**\r\n- [X] **iOS**\r\n- [ ] **Browser**\r\n\r\n**cordova information:**  (run `$> cordova plugin list`) \r\n\r\n```\r\ncom-badrit-base64 0.2.0 \"Base64\"\r\ncordova-android-firebase-gradle-release 2.0.0 \"cordova-android-firebase-gradle-release\"\r\ncordova-android-play-services-gradle-release 1.4.6 \"cordova-android-play-services-gradle-release\"\r\ncordova-plugin-browsertab 0.2.0 \"cordova-plugin-browsertab\"\r\ncordova-plugin-buildinfo 2.0.2 \"BuildInfo\"\r\ncordova-plugin-camera 4.0.3 \"Camera\"\r\ncordova-plugin-compat 1.2.0 \"Compat\"\r\ncordova-plugin-customurlscheme 4.3.0 \"Custom URL scheme\"\r\ncordova-plugin-device 2.0.2 \"Device\"\r\ncordova-plugin-facebook4 3.2.0 \"Facebook Connect\"\r\ncordova-plugin-googlemaps 2.5.3 \"cordova-plugin-googlemaps\"\r\ncordova-plugin-inappbrowser 3.0.0 \"InAppBrowser\"\r\ncordova-plugin-ionic-keyboard 2.1.3 \"cordova-plugin-ionic-keyboard\"\r\ncordova-plugin-ionic-webview 2.3.1 \"cordova-plugin-ionic-webview\"\r\ncordova-plugin-request-location-accuracy 2.2.3 \"Request Location Accuracy\"\r\ncordova-plugin-splashscreen 5.0.2 \"Splashscreen\"\r\ncordova-plugin-telerik-imagepicker 2.2.2 \"ImagePicker\"\r\ncordova-plugin-whitelist 1.3.3 \"Whitelist\"\r\ncordova-universal-links-plugin 1.2.1 \"Universal Links Plugin\"\r\nionic-plugin-deeplinks 1.0.17 \"Ionic Deeplink Plugin\"\r\ntwitter-connect-plugin 0.6.0 \"Twitter Connect\"\r\n```\r\n\r\n**If you use `@ionic-native/google-maps`, please tell the package.json (only `@ionic-native/core` and `@ionic-native/google-maps` are fine mostly)**\r\n```\r\n@ionic-native/core : ^4.11.0\r\n@ionic-native/google-maps : ^4.9.1\r\n```\r\n\r\n**Current behavior:**\r\nSometimes when adding markers with a custom icon, I get a message that it failed loading the url. Right after that I get the following message:\r\n`Terminating app due to uncaught exception 'GMSThreadException', reason: 'The API method must be called from the main thread'`\r\nIf wrap the marker code with a try-catch, the app still crashes\r\n\r\n**Expected behavior:**\r\nThe try-catch block should catch the exception and the app shouldn't crash if it fails to load the marker url.\r\n\r\n**Related code, data or error log (please format your code or data):**\r\nXcode log\r\n\r\n```\r\n2019-04-22 20:02:53.933799-0300 Dishly[58382:3578682] [fail] url = https://s3.amazonaws.com/dishly/img/i/lot_of_shrimp_scampi/1_61689-thumb.jpg\r\n2019-04-22 20:02:53.941674-0300 Dishly[58382:3578682] *** Terminating app due to uncaught exception 'GMSThreadException', reason: 'The API method must be called from the main thread'\r\n*** First throw call stack:\r\n(\r\n\t0   CoreFoundation                      0x000000011029e1bb __exceptionPreprocess + 331\r\n\t1   libobjc.A.dylib                     0x000000010f080735 objc_exception_throw + 48\r\n\t2   CoreFoundation                      0x000000011029e015 +[NSException raise:format:] + 197\r\n\t3   Dishly                              0x0000000109fce4c2 -[GMSOverlay setMap:] + 89\r\n\t4   Dishly                              0x0000000109ef621a __52-[PluginMarker setIcon_:iconProperty:callbackBlock:]_block_invoke.597 + 362\r\n\t5   Dishly                              0x0000000109ef8eb8 __53-[PluginMarker downloadImageWithURL:completionBlock:]_block_invoke_2 + 344\r\n\t6   CFNetwork                           0x000000010f9f3940 __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 19\r\n\t7   CFNetwork                           0x000000010fa09b0c __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 172\r\n\t8   Foundation                          0x000000010eaedf9e __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7\r\n\t9   Foundation                          0x000000010eaedea5 -[NSBlockOperation main] + 68\r\n\t10  Foundation                          0x000000010eaeac14 -[__NSOperationInternal _start:] + 689\r\n\t11  Foundation                          0x000000010eaf0c4b __NSOQSchedule_f + 227\r\n\t12  libdispatch.dylib                   0x00000001107fb595 _dispatch_call_block_and_release + 12\r\n\t13  libdispatch.dylib                   0x00000001107fc602 _dispatch_client_callout + 8\r\n\t14  libdispatch.dylib                   0x00000001107ff54d _dispatch_continuation_pop + 565\r\n\t15  libdispatch.dylib                   0x00000001107fe927 _dispatch_async_redirect_invoke + 859\r\n\t16  libdispatch.dylib                   0x000000011080d00a _dispatch_root_queue_drain + 351\r\n\t17  libdispatch.dylib                   0x000000011080d9af _dispatch_worker_thread2 + 130\r\n\t18  libsystem_pthread.dylib             0x0000000110bec6b3 _pthread_wqthread + 583\r\n\t19  libsystem_pthread.dylib             0x0000000110bec3fd start_wqthread + 13\r\n)\r\nlibc++abi.dylib: terminating with uncaught exception of type NSException\r\n(lldb) \r\n```\r\n\r\n**Support this plugin activity**\r\n\r\nI appreicate if you give me a beer :beer: from [here](\r\nhttps://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=SQPLZJ672HJ9N&lc=US&item_name=Cordova%2dGoogleMaps%2dPlugin&amount=5%2e00&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted)\r\n"},"comment":{"url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/comments/485593116","html_url":"https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/2605#issuecomment-485593116","issue_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/2605","id":485593116,"node_id":"MDEyOklzc3VlQ29tbWVudDQ4NTU5MzExNg==","user":{"login":"eltaiguer","id":8492873,"node_id":"MDQ6VXNlcjg0OTI4NzM=","avatar_url":"https://avatars1.githubusercontent.com/u/8492873?v=4","gravatar_id":"","url":"https://api.github.com/users/eltaiguer","html_url":"https://github.com/eltaiguer","followers_url":"https://api.github.com/users/eltaiguer/followers","following_url":"https://api.github.com/users/eltaiguer/following{/other_user}","gists_url":"https://api.github.com/users/eltaiguer/gists{/gist_id}","starred_url":"https://api.github.com/users/eltaiguer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eltaiguer/subscriptions","organizations_url":"https://api.github.com/users/eltaiguer/orgs","repos_url":"https://api.github.com/users/eltaiguer/repos","events_url":"https://api.github.com/users/eltaiguer/events{/privacy}","received_events_url":"https://api.github.com/users/eltaiguer/received_events","type":"User","site_admin":false},"created_at":"2019-04-22T23:59:32Z","updated_at":"2019-04-22T23:59:32Z","author_association":"NONE","body":"results? what do you mean?"}}
{"actor":{"display_login":"eltaiguer"}}