<?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 sessionDeinitialized when using authorizedClient?.withpathRoot(…) in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/sessionDeinitialized-when-using-authorizedClient-withpathRoot/m-p/726247#M32083</link>
    <description>&lt;P&gt;Hi all&lt;/P&gt;
&lt;P&gt;I'm trying to access a folder outside of my personal root (a team folder).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;if let client = DropboxClientsManager.authorizedClient?.withPathRoot(.namespaceId("12345678")) {
			// do nothing
			print("dropbox connected")
			
			
//			client.users.getCurrentAccount().response(completionHandler: { user, error in
//				
//				print(user)
//				
//				let rootNamespaceId = user?.rootInfo.rootNamespaceId
//				
//				print(rootNamespaceId)
//				
			
			client.files.listFolder(path: "").response(completionHandler:  { response, error in
				
				if let result = response {
					print(Thread.current)
					print(Thread.main)
					print(result)
				} else if let err = error {
					
					print(err)
					
				}
				
			})
		}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm getting a «sessionDeinitialized» when I try to get the folder contents.&lt;/P&gt;
&lt;P&gt;Without the «withPathRoot» everything works fine.&lt;/P&gt;
&lt;P&gt;I get the namespaceId from the user info (the part that's commented out).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What am I doing wrong?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;What am I doing wrong?&lt;/P&gt;</description>
    <pubDate>Thu, 02 Nov 2023 13:35:12 GMT</pubDate>
    <dc:creator>Swissdoode</dc:creator>
    <dc:date>2023-11-02T13:35:12Z</dc:date>
    <item>
      <title>sessionDeinitialized when using authorizedClient?.withpathRoot(…)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/sessionDeinitialized-when-using-authorizedClient-withpathRoot/m-p/726247#M32083</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;
&lt;P&gt;I'm trying to access a folder outside of my personal root (a team folder).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;if let client = DropboxClientsManager.authorizedClient?.withPathRoot(.namespaceId("12345678")) {
			// do nothing
			print("dropbox connected")
			
			
//			client.users.getCurrentAccount().response(completionHandler: { user, error in
//				
//				print(user)
//				
//				let rootNamespaceId = user?.rootInfo.rootNamespaceId
//				
//				print(rootNamespaceId)
//				
			
			client.files.listFolder(path: "").response(completionHandler:  { response, error in
				
				if let result = response {
					print(Thread.current)
					print(Thread.main)
					print(result)
				} else if let err = error {
					
					print(err)
					
				}
				
			})
		}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm getting a «sessionDeinitialized» when I try to get the folder contents.&lt;/P&gt;
&lt;P&gt;Without the «withPathRoot» everything works fine.&lt;/P&gt;
&lt;P&gt;I get the namespaceId from the user info (the part that's commented out).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What am I doing wrong?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;What am I doing wrong?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 13:35:12 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/sessionDeinitialized-when-using-authorizedClient-withpathRoot/m-p/726247#M32083</guid>
      <dc:creator>Swissdoode</dc:creator>
      <dc:date>2023-11-02T13:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: sessionDeinitialized when using authorizedClient?.withpathRoot(…)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/sessionDeinitialized-when-using-authorizedClient-withpathRoot/m-p/726477#M32112</link>
      <description>&lt;P&gt;Note that the requests are performed asynchronously, and from the sessionDeinitialized error it sounds like your client object was released (and accordingly the underlying session was deinitialized) before the request could be completed; to fix that you'd need to update your code to keep that client object around while the request(s) complete.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 16:27:21 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/sessionDeinitialized-when-using-authorizedClient-withpathRoot/m-p/726477#M32112</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-11-02T16:27:21Z</dc:date>
    </item>
  </channel>
</rss>

