<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ArcGISMap.withBasemapStyle causes error when used with OAuth in Flutter Maps SDK Questions</title>
    <link>https://community.esri.com/t5/flutter-maps-sdk-questions/arcgismap-withbasemapstyle-causes-error-when-used/m-p/1589115#M60</link>
    <description>&lt;P&gt;The "Failed to parse header value" exception is caused by a bug in Dart. That bug has been fixed, and the fix will be included in the next major release of Flutter (which will have Dart version 3.8). The bug is written up here:&amp;nbsp;&lt;A href="https://github.com/dart-lang/sdk/issues/46442" target="_blank"&gt;https://github.com/dart-lang/sdk/issues/46442&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Until that fix lands, the workaround is to create a webmap with the desired basemap. Loading a portal item with OAuth works as intended, so that is a general solution to avoiding the "Failed to parse header value" problem.&lt;/P&gt;</description>
    <pubDate>Tue, 25 Feb 2025 19:37:27 GMT</pubDate>
    <dc:creator>PaulSturm</dc:creator>
    <dc:date>2025-02-25T19:37:27Z</dc:date>
    <item>
      <title>ArcGISMap.withBasemapStyle causes error when used with OAuth</title>
      <link>https://community.esri.com/t5/flutter-maps-sdk-questions/arcgismap-withbasemapstyle-causes-error-when-used/m-p/1588969#M58</link>
      <description>&lt;P&gt;I have created a map with simple&amp;nbsp;Topographic basemap and have OAuth set up (I can verify that it works correctly). Also, I don't set 'ArcGISEnvironment.apiKey' variable.&lt;/P&gt;&lt;P&gt;I expect that auth challenge is raised and basemap is loaded after that. Nevertheless, I get the following error in console:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markdown"&gt;flutter: [E] 22:25:29.502337 Unhandled Loadable ArcGISMap load error: ArcGISException: code=22; HttpException: Failed to parse header value&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I set&amp;nbsp;apiKey, everything works well.&lt;/P&gt;&lt;P&gt;This can be reproduced using&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-maps-sdk-flutter-samples/tree/main/lib/samples/authenticate_with_oauth" target="_self"&gt;Authenticate with OAuth&lt;/A&gt; sample. Just remove apiKey in 'main.dart' and change 'onMapViewReady()' function to the following:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;void &lt;/SPAN&gt;&lt;SPAN&gt;onMapViewReady&lt;/SPAN&gt;() {&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;  &lt;SPAN&gt;final &lt;/SPAN&gt;&lt;SPAN&gt;map &lt;/SPAN&gt;= &lt;SPAN&gt;ArcGISMap&lt;/SPAN&gt;.&lt;SPAN&gt;withBasemapStyle&lt;/SPAN&gt;(&lt;SPAN&gt;BasemapStyle&lt;/SPAN&gt;.&lt;SPAN&gt;arcGISTopographic&lt;/SPAN&gt;);&lt;BR /&gt;&lt;BR /&gt;  &lt;SPAN&gt;// Set the map to map view controller.&lt;BR /&gt;&lt;/SPAN&gt;  &lt;SPAN&gt;_mapViewController&lt;/SPAN&gt;.&lt;SPAN&gt;arcGISMap &lt;/SPAN&gt;= &lt;SPAN&gt;map&lt;/SPAN&gt;;&lt;BR /&gt;}&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please clarify how can I use OAuth only (without API key) for loading basemap?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am checking via iPhone 15&amp;nbsp;simulator w/ iOS 17.5. Haven't tried on Android ones.&lt;/P&gt;&lt;P&gt;ArcGIS Flutter SDK version is 200.6.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 15:45:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/flutter-maps-sdk-questions/arcgismap-withbasemapstyle-causes-error-when-used/m-p/1588969#M58</guid>
      <dc:creator>EgorFedorov</dc:creator>
      <dc:date>2025-02-25T15:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGISMap.withBasemapStyle causes error when used with OAuth</title>
      <link>https://community.esri.com/t5/flutter-maps-sdk-questions/arcgismap-withbasemapstyle-causes-error-when-used/m-p/1589115#M60</link>
      <description>&lt;P&gt;The "Failed to parse header value" exception is caused by a bug in Dart. That bug has been fixed, and the fix will be included in the next major release of Flutter (which will have Dart version 3.8). The bug is written up here:&amp;nbsp;&lt;A href="https://github.com/dart-lang/sdk/issues/46442" target="_blank"&gt;https://github.com/dart-lang/sdk/issues/46442&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Until that fix lands, the workaround is to create a webmap with the desired basemap. Loading a portal item with OAuth works as intended, so that is a general solution to avoiding the "Failed to parse header value" problem.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 19:37:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/flutter-maps-sdk-questions/arcgismap-withbasemapstyle-causes-error-when-used/m-p/1589115#M60</guid>
      <dc:creator>PaulSturm</dc:creator>
      <dc:date>2025-02-25T19:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGISMap.withBasemapStyle causes error when used with OAuth</title>
      <link>https://community.esri.com/t5/flutter-maps-sdk-questions/arcgismap-withbasemapstyle-causes-error-when-used/m-p/1589267#M61</link>
      <description>&lt;P&gt;Thanks! Waiting on newest Flutter!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 04:58:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/flutter-maps-sdk-questions/arcgismap-withbasemapstyle-causes-error-when-used/m-p/1589267#M61</guid>
      <dc:creator>EgorFedorov</dc:creator>
      <dc:date>2025-02-26T04:58:05Z</dc:date>
    </item>
  </channel>
</rss>

