javascript: V5: `OrganizationProfile` throws error upon logout
Preliminary Checks
- I have reviewed the documentation: https://clerk.com/docs
 - I have searched for existing issues: https://github.com/clerk/javascript/issues
 - I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
 - This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
 
Reproduction
Publishable key
Description
The issue only happens in V5.
Using the OrganizationProfile in Next.js server component:
/org/[[...org]]/page
export default function OrganizationPage() {
   return (
   <>
      
        Loading...
      
      
        
      
    
   )
}
So far all good
- But when signing out with the 
UserButton 
      <SignedIn>
        <UserButton />
      </SignedIn>
- You get this screen for a second and redirected to 
/sign-inpage as expected 
Like I mentioned above, the exact same flow works in V4 without errors, so I guess it’s some kind of version regression. I want to upgrade to V5 but can’t currently do so due to this issue. Please check, thanks.
Environment
System:
    OS: macOS 14.4.1
    CPU: (11) arm64 Apple M3 Pro
    Memory: 733.31 MB / 36.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.1 - /usr/local/bin/node
    npm: 10.2.4 - /usr/local/bin/npm
    pnpm: 9.0.4 - /opt/homebrew/bin/pnpm
  Browsers:
    Chrome: 123.0.6312.124
    Safari: 17.4.1
  npmPackages:
    @biomejs/biome: 1.7.0 => 1.7.0
    @clerk/nextjs: 5.0.1 => 5.0.1
    @clerk/themes: 1.7.13 => 1.7.13
    @clerk/types: 4.0.0 => 4.0.0
    @datadog/browser-rum: 5.14.0 => 5.14.0
    @hookform/resolvers: 3.3.4 => 3.3.4
    @nextui-org/react: 2.3.4 => 2.3.4
    @playwright/test: 1.42.1 => 1.42.1
    @splitsoftware/splitio: 10.25.2 => 10.25.2
    @splitsoftware/splitio-react: 1.11.1 => 1.11.1
    @tanstack/react-query: 5.28.14 => 5.28.14
    @tanstack/react-table: 8.16.0 => 8.16.0
    @testing-library/react: 15.0.2 => 15.0.2
    @types/node: 20 => 20.12.7
    @types/react: 18 => 18.2.79
    @types/react-dom: 18 => 18.2.25
    @vitejs/plugin-react: 4.2.1 => 4.2.1
    autoprefixer: 10.4.18 => 10.4.18
    axios: 1.6.8 => 1.6.8
    clsx: 2.1.0 => 2.1.0
    dayjs: 1.11.10 => 1.11.10
    fast-deep-equal: 3.1.3 => 3.1.3
    framer-motion: 11.0.24 => 11.0.24
    jotai: 2.8.0 => 2.8.0
    jsdom: 24.0.0 => 24.0.0
    lucide-react: 0.364.0 => 0.364.0
    next: 14.2.2 => 14.2.2
    next-themes: 0.2.1 => 0.2.1
    nextjs-toploader: 1.6.11 => 1.6.11
    orval: 6.26.0 => 6.26.0
    postcss: 8 => 8.4.38
    prettier: 3.2.5 => 3.2.5
    react: 18 => 18.2.0
    react-confetti: 6.1.0 => 6.1.0
    react-dom: 18 => 18.2.0
    react-hook-form: 7.51.3 => 7.51.3
    reactflow: 11.11.0 => 11.11.0
    recharts: 2.12.5 => 2.12.5
    sonner: 1.4.41 => 1.4.41
    tailwind-merge: 2.2.2 => 2.2.2
    tailwindcss: 3.4.3 => 3.4.3
    typescript: 5 => 5.4.5
    vite-tsconfig-paths: 4.3.2 => 4.3.2
    vitest: 1.5.0 => 1.5.0
    zod: 3.22.4 => 3.22.4
About this issue
- Original URL
 - State: closed
 - Created 2 months ago
 - Comments: 15 (8 by maintainers)
 
@panteliselef Thanks a lot for the help. Yeah, sure, I can use the hash workaround for now, but please keep me updated once it’s fixed