Unable to add a production ready device

Hello,

We are experiencing a problem with adding an OAuth protected device. All the steps complete correctly and we get to the “Setup completed successfully” page however once the “Done” button is clicked, it does NOT show it in the Device list. I see an error with retrieving the ID perhaps?

    12-26 13:56:40.240 5562-11132/com.twlighting.tw D/WifiFacade: Currently connected to: Photon-ZMSD, supplicant state: COMPLETED
12-26 13:56:40.240 5562-11132/com.twlighting.tw I/CommandClient: Preparing to send command 'configure-ap'
12-26 13:56:40.253 5562-11132/com.twlighting.tw I/CommandClient: *** BUILT COMMAND DATA: 'configure-ap\n314\n\n{\"ch\":1,\"pwd\":\"xxx\",\"idx\":0,\"ssid\":\"NETGEAR17\",\"sec\":4194308}'
12-26 13:56:40.271 5562-11132/com.twlighting.tw D/CommandClient: Writing command data
12-26 13:56:40.272 5562-11132/com.twlighting.tw D/CommandClient: Reading response data...
12-26 13:56:40.668 5562-11132/com.twlighting.tw D/CommandClient: Command response (raw): \n{\"r\":0}
12-26 13:56:40.675 5562-11132/com.twlighting.tw D/CommandClient: Command response: Response{responseCode=0}
12-26 13:56:40.676 5562-11132/com.twlighting.tw D/ConfigureAPStep: Configure AP command returned: 0
12-26 13:56:41.679 5562-11132/com.twlighting.tw I/ConnectDeviceToNetworkStep: Running step ConnectDeviceToNetworkStep
12-26 13:56:41.680 5562-11132/com.twlighting.tw D/ConnectDeviceToNetworkStep: Ensuring connection to AP
12-26 13:56:41.686 5562-11132/com.twlighting.tw D/WifiFacade: Currently connected to: Photon-ZMSD, supplicant state: COMPLETED
12-26 13:56:41.687 5562-11132/com.twlighting.tw D/ConnectDeviceToNetworkStep: Sending connect-ap command
12-26 13:56:41.687 5562-11132/com.twlighting.tw I/CommandClient: Preparing to send command 'connect-ap'
12-26 13:56:41.690 5562-11132/com.twlighting.tw I/CommandClient: *** BUILT COMMAND DATA: 'connect-ap\n9\n\n{\"idx\":0}'
12-26 13:56:41.714 5562-11132/com.twlighting.tw D/CommandClient: Writing command data
12-26 13:56:41.715 5562-11132/com.twlighting.tw D/CommandClient: Reading response data...
12-26 13:56:41.719 5562-11132/com.twlighting.tw D/CommandClient: Command response (raw): \n{\"r\":0}
12-26 13:56:41.722 5562-11132/com.twlighting.tw D/CommandClient: Command response: Response{responseCode=0}
12-26 13:56:42.724 5562-11132/com.twlighting.tw I/WaitForDisconnectionFromDeviceStep: Running step WaitForDisconnectionFromDeviceStep
12-26 13:56:42.726 5562-11132/com.twlighting.tw D/WifiFacade: Currently connected to: Photon-ZMSD, supplicant state: COMPLETED
12-26 13:56:42.726 5562-11132/com.twlighting.tw D/WaitForDisconnectionFromDeviceStep: Currently connected SSID: Photon-ZMSD
12-26 13:56:42.929 5562-11132/com.twlighting.tw D/WifiFacade: Currently connected to: Photon-ZMSD, supplicant state: COMPLETED
12-26 13:56:42.929 5562-11132/com.twlighting.tw D/WaitForDisconnectionFromDeviceStep: Currently connected SSID: Photon-ZMSD
12-26 13:56:43.136 5562-11132/com.twlighting.tw D/WifiFacade: Currently connected to: Photon-ZMSD, supplicant state: COMPLETED
12-26 13:56:43.137 5562-11132/com.twlighting.tw D/WaitForDisconnectionFromDeviceStep: Currently connected SSID: Photon-ZMSD
12-26 13:56:43.348 5562-11132/com.twlighting.tw D/WifiFacade: Currently connected to: Photon-ZMSD, supplicant state: COMPLETED
12-26 13:56:43.348 5562-11132/com.twlighting.tw D/WaitForDisconnectionFromDeviceStep: Currently connected SSID: Photon-ZMSD
12-26 13:56:43.552 5562-11132/com.twlighting.tw D/WifiFacade: Currently connected to: Photon-ZMSD, supplicant state: COMPLETED
12-26 13:56:43.552 5562-11132/com.twlighting.tw D/WaitForDisconnectionFromDeviceStep: Currently connected SSID: Photon-ZMSD
12-26 13:56:43.756 5562-11132/com.twlighting.tw D/WifiFacade: Currently connected to: Photon-ZMSD, supplicant state: COMPLETED
12-26 13:56:43.756 5562-11132/com.twlighting.tw D/WaitForDisconnectionFromDeviceStep: Currently connected SSID: Photon-ZMSD
12-26 13:56:45.962 5562-11132/com.twlighting.tw W/ConnectingProcessWorkerTask: Setup step failed: Not disconnected from soft AP
12-26 13:56:46.965 5562-11132/com.twlighting.tw I/ConfigureAPStep: Step ConfigureAPStep already fulfilled, skipping...
12-26 13:56:47.966 5562-11132/com.twlighting.tw I/ConnectDeviceToNetworkStep: Step ConnectDeviceToNetworkStep already fulfilled, skipping...
12-26 13:56:48.967 5562-11132/com.twlighting.tw I/WaitForDisconnectionFromDeviceStep: Running step WaitForDisconnectionFromDeviceStep
12-26 13:56:48.972 5562-11132/com.twlighting.tw D/WifiFacade: Currently connected to: Photon-ZMSD, supplicant state: COMPLETED
12-26 13:56:48.972 5562-11132/com.twlighting.tw D/WaitForDisconnectionFromDeviceStep: Currently connected SSID: Photon-ZMSD
12-26 13:56:49.176 5562-11132/com.twlighting.tw D/WifiFacade: Currently connected to: Photon-ZMSD, supplicant state: COMPLETED
12-26 13:56:49.176 5562-11132/com.twlighting.tw D/WaitForDisconnectionFromDeviceStep: Currently connected SSID: Photon-ZMSD
12-26 13:56:49.385 5562-11132/com.twlighting.tw D/WifiFacade: Currently connected to: Photon-ZMSD, supplicant state: COMPLETED
12-26 13:56:49.386 5562-11132/com.twlighting.tw D/WaitForDisconnectionFromDeviceStep: Currently connected SSID: Photon-ZMSD
12-26 13:56:49.598 5562-11132/com.twlighting.tw D/WifiFacade: Currently connected to: Photon-ZMSD, supplicant state: COMPLETED
12-26 13:56:49.599 5562-11132/com.twlighting.tw D/WaitForDisconnectionFromDeviceStep: Currently connected SSID: Photon-ZMSD
12-26 13:56:49.809 5562-11132/com.twlighting.tw D/WifiFacade: Currently connected to: Photon-ZMSD, supplicant state: COMPLETED
12-26 13:56:49.809 5562-11132/com.twlighting.tw D/WaitForDisconnectionFromDeviceStep: Currently connected SSID: Photon-ZMSD
12-26 13:56:50.019 5562-11132/com.twlighting.tw D/WifiFacade: Currently connected to: Photon-ZMSD, supplicant state: COMPLETED
12-26 13:56:50.020 5562-11132/com.twlighting.tw D/WaitForDisconnectionFromDeviceStep: Currently connected SSID: Photon-ZMSD
12-26 13:56:52.225 5562-11132/com.twlighting.tw W/ConnectingProcessWorkerTask: Setup step failed: Not disconnected from soft AP
12-26 13:56:53.226 5562-11132/com.twlighting.tw I/ConfigureAPStep: Step ConfigureAPStep already fulfilled, skipping...
12-26 13:56:54.228 5562-11132/com.twlighting.tw I/ConnectDeviceToNetworkStep: Step ConnectDeviceToNetworkStep already fulfilled, skipping...
12-26 13:56:55.230 5562-11132/com.twlighting.tw I/WaitForDisconnectionFromDeviceStep: Running step WaitForDisconnectionFromDeviceStep
12-26 13:56:55.231 5562-11132/com.twlighting.tw D/WifiFacade: Currently connected to: <unknown ssid>, supplicant state: DISCONNECTED
12-26 13:56:55.231 5562-11132/com.twlighting.tw D/WaitForDisconnectionFromDeviceStep: Currently connected SSID: <unknown ssid>
12-26 13:56:57.266 5562-11132/com.twlighting.tw I/EnsureSoftApNotVisible: Running step EnsureSoftApNotVisible
12-26 13:56:57.270 5562-11132/com.twlighting.tw D/WifiFacade: Currently connected to: NETGEAR17, supplicant state: COMPLETED
12-26 13:56:57.284 5562-11132/com.twlighting.tw D/EnsureSoftApNotVisible: scansPlusConnectedSsid: [NETGEAR17, NETGEAR17, NETGEAR17-5G]
12-26 13:56:57.284 5562-11132/com.twlighting.tw D/EnsureSoftApNotVisible: Soft AP we're looking for: Photon-ZMSD
12-26 13:56:57.284 5562-11132/com.twlighting.tw D/EnsureSoftApNotVisible: Matching SSID result: 'null'
12-26 13:56:58.288 5562-11132/com.twlighting.tw I/WaitForCloudConnectivityStep: Step WaitForCloudConnectivityStep already fulfilled, skipping...
12-26 13:56:58.290 5562-5562/com.twlighting.tw D/ConnectingActivity: HUZZAH, VICTORY!
12-26 13:56:58.296 5562-11310/com.twlighting.tw D/Retrofit: ---> HTTP GET https://api.particle.io/v1/devices
12-26 13:56:58.297 5562-11310/com.twlighting.tw D/Retrofit: Authorization: Bearer d61056b02899dc6aa7d808dbf462bdde3d87cbb8
12-26 13:56:58.297 5562-11310/com.twlighting.tw D/Retrofit: ---> END HTTP (no body)
12-26 13:56:58.330 5562-5562/com.twlighting.tw D/ViewRootImpl@9c063cf[ConnectingActivity]: MSG_WINDOW_FOCUS_CHANGED 0
12-26 13:56:58.348 5562-5562/com.twlighting.tw V/ActivityThread: performLaunchActivity: mActivityCurrentConfig={0 1.0 themeSeq = 0 showBtnBg = 0 310mcc120mnc [en_US] ldltr sw360dp w360dp h668dp 480dpi nrml long port ?dc finger -keyb/v/h -nav/h mkbd/h desktop/d s.105}
12-26 13:56:58.377 5562-5562/com.twlighting.tw D/TextView: setTypeface with style : 0
12-26 13:56:58.379 5562-5562/com.twlighting.tw D/TextView: setTypeface with style : 0
12-26 13:56:58.380 5562-5562/com.twlighting.tw D/TextView: setTypeface with style : 0
12-26 13:56:58.385 5562-5562/com.twlighting.tw D/TextView: setTypeface with style : 0
12-26 13:56:58.388 5562-5562/com.twlighting.tw D/TextView: setTypeface with style : 0
12-26 13:56:58.391 5562-5562/com.twlighting.tw D/TextView: setTypeface with style : 0
12-26 13:56:58.427 5562-11317/com.twlighting.tw D/Retrofit: ---> HTTP GET https://api.particle.io/v1/devices/3b0039001951353530353431
12-26 13:56:58.427 5562-11317/com.twlighting.tw D/Retrofit: Authorization: Bearer d61056b02899dc6aa7d808dbf462bdde3d87cbb8
12-26 13:56:58.427 5562-11317/com.twlighting.tw D/Retrofit: ---> END HTTP (no body)
12-26 13:56:58.440 5562-5562/com.twlighting.tw I/SemDesktopModeManager: registerListener: android.view.ViewRootImpl$3@4116854
12-26 13:56:58.444 5562-5562/com.twlighting.tw D/ViewRootImpl@e2b33fd[SuccessActivity]: ThreadedRenderer.create() translucent=false
12-26 13:56:58.448 5562-5562/com.twlighting.tw D/InputTransport: Input channel constructed: fd=105
12-26 13:56:58.448 5562-5562/com.twlighting.tw D/ViewRootImpl@e2b33fd[SuccessActivity]: setView = DecorView@4ea68f2[SuccessActivity] touchMode=true
12-26 13:56:58.454 5562-5562/com.twlighting.tw D/ViewRootImpl@e2b33fd[SuccessActivity]: dispatchAttachedToWindow
12-26 13:56:58.476 5562-5562/com.twlighting.tw D/ViewRootImpl@e2b33fd[SuccessActivity]: Relayout returned: oldFrame=[0,0][0,0] newFrame=[0,0][1080,2220] result=0x27 surface={isValid=true 546736616448} surfaceGenerationChanged=true
12-26 13:56:58.476 5562-5562/com.twlighting.tw D/ViewRootImpl@e2b33fd[SuccessActivity]: mHardwareRenderer.initialize() mSurface={isValid=true 546736616448} hwInitialized=true
12-26 13:56:58.537 5562-5562/com.twlighting.tw D/ViewRootImpl@e2b33fd[SuccessActivity]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1080, 2220) ci=Rect(0, 72 - 0, 144) vi=Rect(0, 72 - 0, 144) or=1
12-26 13:56:58.537 5562-5562/com.twlighting.tw D/ViewRootImpl@e2b33fd[SuccessActivity]: MSG_WINDOW_FOCUS_CHANGED 1
12-26 13:56:58.538 5562-5562/com.twlighting.tw D/ViewRootImpl@e2b33fd[SuccessActivity]: mHardwareRenderer.initializeIfNeeded()#2 mSurface={isValid=true 546736616448}
12-26 13:56:58.565 5562-5562/com.twlighting.tw V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@3fc12f9 nm : com.twlighting.tw ic=null
12-26 13:56:58.565 5562-5562/com.twlighting.tw I/InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
12-26 13:56:58.584 5562-5562/com.twlighting.tw D/InputTransport: Input channel constructed: fd=113
12-26 13:56:58.584 5562-5562/com.twlighting.tw D/InputTransport: Input channel destroyed: fd=114
12-26 13:56:58.606 5562-5562/com.twlighting.tw D/ViewRootImpl@9c063cf[ConnectingActivity]: mHardwareRenderer.destroy()#1
12-26 13:56:58.611 5562-5562/com.twlighting.tw D/ViewRootImpl@9c063cf[ConnectingActivity]: Relayout returned: oldFrame=[0,0][1080,2220] newFrame=[0,0][1080,2220] result=0x5 surface={isValid=false 0} surfaceGenerationChanged=true
12-26 13:56:58.995 5562-5562/com.twlighting.tw D/WifiFacade: Removing network configuration for:Photon-ZMSD
12-26 13:56:58.995 5562-5562/com.twlighting.tw D/WifiFacade: Removing network configuration for networkId: 0
12-26 13:56:59.033 5562-5562/com.twlighting.tw V/SoftAPConfigRemover: reenableWifiNetworks()
12-26 13:56:59.036 5562-5562/com.twlighting.tw D/WifiFacade: Reenabling network configuration for:NETGEAR17
12-26 13:56:59.046 5562-5562/com.twlighting.tw D/ViewRootImpl@9c063cf[ConnectingActivity]: mHardwareRenderer.destroy()#4
12-26 13:56:59.046 5562-5562/com.twlighting.tw D/ViewRootImpl@9c063cf[ConnectingActivity]: dispatchDetachedFromWindow
12-26 13:56:59.051 5562-5562/com.twlighting.tw D/InputTransport: Input channel destroyed: fd=115
12-26 13:56:59.052 5562-5562/com.twlighting.tw I/SemDesktopModeManager: unregisterListener: android.view.ViewRootImpl$3@3950c2e
12-26 13:57:00.003 5562-11317/com.twlighting.tw D/Retrofit: <--- HTTP 403 https://api.particle.io/v1/devices/3b0039001951353530353431 (1575ms)
12-26 13:57:00.003 5562-11317/com.twlighting.tw D/Retrofit: date: Tue, 26 Dec 2017 18:57:00 GMT
12-26 13:57:00.003 5562-11317/com.twlighting.tw D/Retrofit: content-type: application/json; charset=utf-8
12-26 13:57:00.003 5562-11317/com.twlighting.tw D/Retrofit: content-length: 151
12-26 13:57:00.003 5562-11317/com.twlighting.tw D/Retrofit: server: nginx
12-26 13:57:00.003 5562-11317/com.twlighting.tw D/Retrofit: x-request-id: d310936c-0fde-4118-8641-749ba3cc36d9
12-26 13:57:00.003 5562-11317/com.twlighting.tw D/Retrofit: access-control-allow-origin: *
12-26 13:57:00.003 5562-11317/com.twlighting.tw D/Retrofit: OkHttp-Sent-Millis: 1514314619856
12-26 13:57:00.003 5562-11317/com.twlighting.tw D/Retrofit: OkHttp-Received-Millis: 1514314620003
12-26 13:57:00.004 5562-11317/com.twlighting.tw D/Retrofit: {"error":"Permission Denied","info":"I didn't recognize that device name or ID, try opening https://api.particle.io/v1/devices?access_token=undefined"}
12-26 13:57:00.004 5562-11317/com.twlighting.tw D/Retrofit: <--- END HTTP (151-byte body)
12-26 13:57:00.008 5562-5562/com.twlighting.tw E/Async: Error calling API: Permission Denied
                                                        io.particle.android.sdk.cloud.ParticleCloudException
                                                            at io.particle.android.sdk.cloud.ParticleCloud.getDevice(ParticleCloud.java:690)
                                                            at io.particle.android.sdk.cloud.ParticleCloud.getDevice(ParticleCloud.java:425)
                                                            at io.particle.android.sdk.devicesetup.ui.SuccessActivity$2.callApi(SuccessActivity.java:216)
                                                            at io.particle.android.sdk.devicesetup.ui.SuccessActivity$2.callApi(SuccessActivity.java:213)
                                                            at io.particle.android.sdk.utils.Async$AsyncApiWorker.doInBackground(Async.java:111)
                                                            at io.particle.android.sdk.utils.Async$AsyncApiWorker.doInBackground(Async.java:79)
                                                            at android.os.AsyncTask$2.call(AsyncTask.java:304)
                                                            at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
                                                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
                                                            at java.lang.Thread.run(Thread.java:762)
12-26 13:57:03.371 5562-11310/com.twlighting.tw D/Retrofit: ---- ERROR https://api.particle.io/v1/devices
12-26 13:57:03.377 5562-11310/com.twlighting.tw D/Retrofit: java.net.UnknownHostException: Unable to resolve host "api.particle.io": No address associated with hostname
                                                                at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:125)
                                                                at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:74)
                                                                at java.net.InetAddress.getAllByName(InetAddress.java:752)
                                                                at com.squareup.okhttp.Dns$1.lookup(Dns.java:39)
                                                                at com.squareup.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:175)
                                                                at com.squareup.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:141)
                                                                at com.squareup.okhttp.internal.http.RouteSelector.next(RouteSelector.java:83)
                                                                at com.squareup.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:174)
                                                                at com.squareup.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:126)
                                                                at com.squareup.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:95)
                                                                at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:281)
                                                                at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:224)
                                                                at com.squareup.okhttp.Call.getResponse(Call.java:286)
                                                                at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:243)
                                                                at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:205)
                                                                at com.squareup.okhttp.Call.execute(Call.java:80)
                                                                at retrofit.client.OkClient.execute(OkClient.java:53)
                                                                at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:326)
                                                                at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:240)
                                                                at java.lang.reflect.Proxy.invoke(Proxy.java:813)
                                                                at $Proxy0.getDevices(Unknown Source)
                                                                at io.particle.android.sdk.cloud.ParticleCloud.getDevices(ParticleCloud.java:325)
                                                                at io.particle.android.sdk.devicesetup.ui.ConnectingActivity$ConnectingProcessWorkerTask.lambda$onPostExecute$0(ConnectingActivity.java:273)
                                                                at io.particle.android.sdk.devicesetup.ui.ConnectingActivity$ConnectingProcessWorkerTask$$Lambda$1.run(Unknown Source)
                                                                at io.particle.android.sdk.utils.EZ$1.doInBackground(EZ.java:46)
                                                                at io.particle.android.sdk.utils.EZ$1.doInBackground(EZ.java:42)
                                                                at android.os.AsyncTask$2.call(AsyncTask.java:304)
                                                                at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
                                                                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
                                                                at java.lang.Thread.run(Thread.java:762)
                                                             Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
                                                                at libcore.io.Posix.android_getaddrinfo(Native Method)
                                                                at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:55)
                                                                at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:106)
                                                                at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:74) 
                                                                at java.net.InetAddress.getAllByName(InetAddress.java:752) 
                                                                at com.squareup.okhttp.Dns$1.lookup(Dns.java:39) 
                                                                at com.squareup.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:175) 
                                                                at com.squareup.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:141) 
                                                                at com.squareup.okhttp.internal.http.RouteSelector.next(RouteSelector.java:83) 
                                                                at com.squareup.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:174) 
                                                                at com.squareup.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:126) 
                                                                at com.squareup.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:95) 
                                                                at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:281) 
                                                                at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:224) 
                                                                at com.squareup.okhttp.Call.getResponse(Call.java:286) 
                                                                at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:243) 
                                                                at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:205) 
                                                                at com.squareup.okhttp.Call.execute(Call.java:80) 
                                                                at retrofit.client.OkClient.execute(OkClient.java:53) 
                                                                at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:326) 
                                                                at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:240) 
                                                                at java.lang.reflect.Proxy.invoke(Proxy.java:813) 
                                                                at $Proxy0.getDevices(Unknown Source) 
                                                                at io.particle.android.sdk.cloud.ParticleCloud.getDevices(ParticleCloud.java:325) 
                                                                at io.particle.android.sdk.devicesetup.ui.ConnectingActivity$ConnectingProcessWorkerTask.lambda$onPostExecute$0(ConnectingActivity.java:273) 
                                                                at io.particle.android.sdk.devicesetup.ui.ConnectingActivity$ConnectingProcessWorkerTask$$Lambda$1.run(Unknown Source) 
                                                                at io.particle.android.sdk.utils.EZ$1.doInBackground(EZ.java:46) 
                                                                at io.particle.android.sdk.utils.EZ$1.doInBackground(EZ.java:42) 
                                                                at android.os.AsyncTask$2.call(AsyncTask.java:304) 
                                                                at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
                                                                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
                                                                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
                                                                at java.lang.Thread.run(Thread.java:762) 
12-26 13:57:03.377 5562-11310/com.twlighting.tw D/Retrofit: ---- END ERROR
12-26 13:57:03.377 5562-11310/com.twlighting.tw W/System.err: io.particle.android.sdk.cloud.ParticleCloudException
12-26 13:57:03.377 5562-11310/com.twlighting.tw W/System.err:     at io.particle.android.sdk.cloud.ParticleCloud.getDevices(ParticleCloud.java:346)
12-26 13:57:03.377 5562-11310/com.twlighting.tw W/System.err:     at io.particle.android.sdk.devicesetup.ui.ConnectingActivity$ConnectingProcessWorkerTask.lambda$onPostExecute$0(ConnectingActivity.java:273)
12-26 13:57:03.377 5562-11310/com.twlighting.tw W/System.err:     at io.particle.android.sdk.devicesetup.ui.ConnectingActivity$ConnectingProcessWorkerTask$$Lambda$1.run(Unknown Source)
12-26 13:57:03.377 5562-11310/com.twlighting.tw W/System.err:     at io.particle.android.sdk.utils.EZ$1.doInBackground(EZ.java:46)
12-26 13:57:03.378 5562-11310/com.twlighting.tw W/System.err:     at io.particle.android.sdk.utils.EZ$1.doInBackground(EZ.java:42)
12-26 13:57:03.378 5562-11310/com.twlighting.tw W/System.err:     at android.os.AsyncTask$2.call(AsyncTask.java:304)
12-26 13:57:03.378 5562-11310/com.twlighting.tw W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
12-26 13:57:03.378 5562-11310/com.twlighting.tw W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
12-26 13:57:03.379 5562-11310/com.twlighting.tw W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
12-26 13:57:03.379 5562-11310/com.twlighting.tw W/System.err:     at java.lang.Thread.run(Thread.java:762)

Any help is appreciated. Here is the gradle file:
apply plugin: ‘com.android.application’

android {
    compileSdkVersion 27
    buildToolsVersion '27.0.2'
    defaultConfig {
        applicationId "com.twlighting.tw"
        minSdkVersion 16
        targetSdkVersion 27
        versionCode 16
        versionName "1.6.4"
        vectorDrawables.useSupportLibrary = true
        //multiDexEnabled true
        //jackOptions {
        //    enabled true
        //}
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    /*dexOptions {
        preDexLibraries true
        maxProcessCount 8 // Default is 4. Speeds up build.
        // Instead of setting the heap size for the DEX process, increase Gradle's
        // heap size to enable dex-in-process. To learm more, read the next section.
        // javaMaxHeapSize "2048m"
    }*/
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')

    compile 'com.android.support:support-v4:27.0.2'
    compile 'com.android.support:support-fragment:27.0.2'
    compile 'com.android.support:support-annotations:27.0.2'
    compile 'com.android.support:support-vector-drawable:27.0.2'
    compile 'com.android.support:design:27.0.2'
    compile 'com.android.support:recyclerview-v7:27.0.2'
    compile 'com.android.support:appcompat-v7:27.0.2'
    compile 'com.android.support:gridlayout-v7:27.0.2'
    compile 'com.android.support:cardview-v7:27.0.2'

    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.google.android.gms:play-services-maps:11.0.2'
    compile 'com.google.android.gms:play-services-location:11.0.2'

    compile 'io.particle:cloudsdk:0.4.8'
    compile 'io.particle:devicesetup:0.4.9'
    compile 'com.getbase:floatingactionbutton:1.10.0'
    compile 'com.afollestad.material-dialogs:core:0.9.2.3'
    compile 'com.tumblr:bookends:1.0.0'
    compile 'com.squareup.okio:okio:1.11.0'
    compile 'com.squareup.phrase:phrase:1.0.3'
    compile 'uk.co.chrisjenx:calligraphy:2.2.0'

    compile 'com.google.guava:guava:20.0'
    compile 'com.github.barteksc:android-pdf-viewer:2.7.0'
}

Particle customization:
<string name=“oauth_client_id”>xxx</string>
<string name=“oauth_client_secret”>xxx</string>
<bool name=“productMode”>true</bool>
<integer name=“product_id”>xxx</integer>
<string name=“network_name_prefix”>Photon</string>

Hey, any updates guys?

It looks like you just have a flat out dns resolution problem resolving the fqdn hostname for the api server!

java.net.UnknownHostException: 
Unable to resolve host "api.particle.io": No address associated with hostname 
at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:125)

Is this a virtual device? Are you connected to the internet? etc.

It is a physical device. Yes, it is connected to the internet. We are using the device setup library. I do believe that the setup library connects to the photon. Do you think it is due to that?

the device setup example looks for an SSID nearby that would indicate a photon in setup mode (using the device network_name_prefix customization string). Once found and selected, it will then connect to that photon’s advertised Wifi SSID to transfer the Wireless Network Credentials for the wireless network that is selected in the previous setup steps for the photon to connect to. The exception you are getting is due to the fact that the example app can no longer connect to the internet. Are you running the example app in a Virtual device emulator? If so, try running the example app on an actual android device. Using a virtual device in my experience is problematic because the virtual device will have trouble switching between your valid WiFi network and the photon’s softAP network during setup. This is because the virtual android device’s interface is bonded to some network interface on the emulator host, and in my experience, it doesn’t work right probably due to limitations in the configuration of the virtual device emulator’s network setup (i.e. you can either bond to the good WiFi network with internet access, or you can bond to the photon’s softAP network). But bonding to one or the other during the setup flow won’t work right. This is because the device setup app needs to be able to switch back and forth between the two, initially it switches from your good WiFi network to the Photon’s WiFi SSID, and then it switches back (to your internet connected WiFi Network) once the WiFi creds are transferred to the photon and the photon stops advertising it’s softAP Wireless SSID. If your device does not switch back to your regular WiFi internet connected network, it may indicate that the photon has not stopped advertising it’s softAP wifi SSID, meaning a failure to connect to the target WiFi network using the provided WiFi network credentials. So, the device setup app failing to switch back to your internet connected WiFi network would produce similar exceptions, because it is trying to access the internet using the Photon’s softAP Wireless network, which does not have internet access.

Try running your example app by deploying onto an actual android hardware device. Other than this, I have no better advice for you without additional more detailed information on your example app’s customizations / use case scenario specific to your environment.

Thanks for the reply. This is NOT the example app. We developed our custom app, but we are using the Device Setup library. Everything was working fine until we switched to product mode. The app is running on a physical Android phone.

Do you know if there is a product mode in Android? We do not see any documentation related to product mode in Android like in iOS. Any help is appreciated.

Anyone have any suggestions?

Hey, is there anyone who could confirm whether the product mode is available in Android or not? If so, could you let me know whether we need to provide new URL endpoints rather than particles?

I don't understand why you are so adamant in receiving help from the community if you are not investigating your own stack trace and the exceptions that clearly show that you have network problems.

If you could provide some kind of Documentation or reference to what you mean by "product" mode I would be happy to take a second look.