HTTP FAILED: java.net.UnknownHostException: Unable to resolve host “d0a3d50725d5.mock.pstmn.io”: No address associated with hostname
Are you able to share more information and context about the issue here.
Are you running a particular version of Postman? The most details that can be shared, the easier it will be to investigate what could be happening here.
We have seen issues in the past with Mock Servers and Android devices but a fix for that was added recently.
Hi Team,
I’m facing an issue where my Android app cannot resolve the hostname of a Postman Mock server.
Error from Android Logcat:
HTTP FAILED: java.net.UnknownHostException: Unable to resolve host "xxxxxxxx-ccccc.mock.pstmn.io": No address associated with hostname
Environment details:
-
Android version: [Android 13 Emulator / Pixel 7 physical device/also all emulators same ]
-
App networking: Using Retrofit + OkHttp
-
Base URL:
https://uuidxxxx.mock.pstmn.io/ -
Postman version: latest version
-
Mock server type: [Free ]
Checks I did:
-
Mock server works fine in browser (desktop, outside Android, even inside emulator browser is working but from app itself showing that java.net.UnknownHostException).
-
The same URL fails only on Android device/emulator but it is working with iOS emulator.
-
Device has active internet connection.
-
Tried restarting emulator and device — same error.
-
Tried switching networks (WiFi vs Mobile data) — same error.
It seems like the Android device/emulator cannot resolve mock.pstmn.io via DNS. I read that there were known issues with Postman Mock Servers + Android devices before, but apparently a fix was shipped. Could this be a regression or a DNS issue on Postman’s side?
Would appreciate guidance on whether there’s an ongoing issue with mock.pstmn.io resolution from Android, or if I need to configure anything differently.
Thanks
It was working fine until Tuesday night then from Wednesday morning we faced this issue with all android teams.