Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • Bugs /
avatar image
Question by kerem · Jul 13, 2017 at 09:20 AM · apisunity3dShared Group Data

unity3d 2017 UriFormatException: Invalid URI: The hostname could not be parsed. (.playfabapi.com),UriFormatException: Invalid URI: The hostname could not be parsed. (.playfabapi.com)

just updated unity 2017.1 and all i am getting is this error when making an api call

UriFormatException: Invalid URI: The hostname could not be parsed. (.playfabapi.com) System.Uri.Parse (UriKind kind, System.String uriString) System.Uri.ParseUri (UriKind kind) System.Uri..ctor (System.String uriString, Boolean dontEscape) System.Uri..ctor (System.String uriString) System.Net.WebRequest.Create (System.String requestUriString) PlayFab.Internal.PlayFabWebRequest.Post (PlayFab.Internal.CallRequestContainer reqContainer) (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWebRequest.cs:178) Rethrow as Exception: Unhandled exception in Post : https://.playfabapi.com/Client/LoginWithCustomID UnityEngine.Debug:LogException(Exception) PlayFab.Internal.PlayFabWebRequest:Post(CallRequestContainer) (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWebRequest.cs:218) PlayFab.Internal.PlayFabWebRequest:WorkerThreadMainLoop() (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWebRequest.cs:131)

,

Just updated to unity 2017 and everything gone nuts.

All my api calls are returning this error.

UriFormatException: Invalid URI: The hostname could not be parsed. (.playfabapi.com) System.Uri.Parse (UriKind kind, System.String uriString) System.Uri.ParseUri (UriKind kind) System.Uri..ctor (System.String uriString, Boolean dontEscape) System.Uri..ctor (System.String uriString) System.Net.WebRequest.Create (System.String requestUriString) PlayFab.Internal.PlayFabWebRequest.Post (PlayFab.Internal.CallRequestContainer reqContainer) (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWebRequest.cs:178) Rethrow as Exception: Unhandled exception in Post : https://.playfabapi.com/Client/LoginWithCustomID UnityEngine.Debug:LogException(Exception) PlayFab.Internal.PlayFabWebRequest:Post(CallRequestContainer) (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWebRequest.cs:218) PlayFab.Internal.PlayFabWebRequest:WorkerThreadMainLoop() (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWebRequest.cs:131)

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Jul 13, 2017 at 09:21 AM

The most common cause of this is not having the Title ID set correctly in the build. The URL endpoint for any call to PlayFab will always be https:{TitleID}.playfabapi.com/... (with the client, server, matchmaker, or admin api reference to follow).

Comment

People who like this

0 Show 1 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image kerem · Jul 14, 2017 at 06:57 AM 0
Share

it worked. Thanks

avatar image

Answer by Robert · Jul 22, 2017 at 05:06 AM

I came across the exact same error today after upgrading to Unity 2017.1.0f3, even though I hadn't touched the code. Anytime the SDK updates or in this case, Unity has an update, you'll have to go into the PlayFab settings. I figured where else would it store that info, in my case using the Editor Extension, and noticed that in the Settings tab the Studio had defaulted back to the _Override_ setting. So even if the Title ID is set correctly in the code, as @Brendan said it's the build itself, PlayFab's settings.

Comment
Robert

People who like this

1 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    1 Person is following this question.

    avatar image

    Related Questions

    Invalid Input parameter for valid e-mail address 2 Answers

    Cannot add member to Shared Group via Server API in Cloud Script 1 Answer

    HttpWebRequest Proxy set to null? 1 Answer

    StackOverflow On PlayFabClientAPI.ForgetAllCredentials(); 0 Answers

    Weird iOS Stripping issue with Unity 2020: Null Reference ,Weird iOS Stripping Bug: Unity 2020. Null Reference 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges