63 lines
1.6 KiB
Markdown
63 lines
1.6 KiB
Markdown
|
|
# BROWSER CACHE ISSUE - QUICK FIX
|
||
|
|
|
||
|
|
## Problem
|
||
|
|
The browser has cached the OLD JavaScript that still tries to use `window.open()` before checking for Bitcoin.
|
||
|
|
|
||
|
|
## Solution
|
||
|
|
|
||
|
|
### Option 1: Hard Refresh (Fastest)
|
||
|
|
1. Open http://localhost:8100
|
||
|
|
2. Press **Cmd+Shift+R** (Mac) or **Ctrl+Shift+R** (Windows/Linux)
|
||
|
|
3. This forces the browser to reload all JavaScript
|
||
|
|
4. Navigate to My Apps
|
||
|
|
5. Click Launch on Bitcoin Core
|
||
|
|
6. ✅ Should now open the custom UI!
|
||
|
|
|
||
|
|
### Option 2: Clear Cache (Most Thorough)
|
||
|
|
1. Open DevTools (F12)
|
||
|
|
2. Right-click the refresh button
|
||
|
|
3. Select "Empty Cache and Hard Reload"
|
||
|
|
4. Or: Go to Application > Clear Storage > Clear site data
|
||
|
|
|
||
|
|
### Option 3: Incognito/Private Window
|
||
|
|
1. Open a new incognito/private window
|
||
|
|
2. Go to http://localhost:8100
|
||
|
|
3. Test the launch button
|
||
|
|
4. Will use fresh JavaScript without cache
|
||
|
|
|
||
|
|
## What Changed
|
||
|
|
|
||
|
|
**OLD CODE** (line 192 in error):
|
||
|
|
```typescript
|
||
|
|
function launchApp(id: string) {
|
||
|
|
const lanAddress = pkg?.installed?.['interface-addresses']?.main?.['lan-address']
|
||
|
|
if (lanAddress) {
|
||
|
|
window.open(lanAddress, '_blank') // <-- Error here with 18443-18444
|
||
|
|
return
|
||
|
|
}
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
**NEW CODE** (current):
|
||
|
|
```typescript
|
||
|
|
function launchApp(id: string) {
|
||
|
|
// Special handling for Bitcoin Core - open custom UI
|
||
|
|
if (id === 'bitcoin') {
|
||
|
|
router.push('/dashboard/apps/bitcoin-core') // <-- Opens custom UI
|
||
|
|
return
|
||
|
|
}
|
||
|
|
// ... rest of code
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
## Verification
|
||
|
|
|
||
|
|
After hard refresh, check browser console:
|
||
|
|
- ✅ No more "Unable to open a window with invalid URL" error
|
||
|
|
- ✅ Clicking Launch routes to `/dashboard/apps/bitcoin-core`
|
||
|
|
- ✅ Beautiful glassmorphism UI appears
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
**The code is correct. Just need to clear browser cache!**
|