This guide walks you through testing the complete ResVault wallet integration for secure rooms.
Chrome Web Store: (or build from source)
Repository: https://github.com/apache/incubator-resilientdb-resvault
Clone and follow build instructions in the repository README
Installation Steps:
- Visit Chrome Extensions page:
chrome://extensions/ - Enable "Developer mode" (top right)
- Click "Load unpacked"
- Select the ResVault build directory
- Verify extension icon appears in toolbar
- Click the ResVault extension icon
- Create a new wallet or import existing
- Set a password
- Keep the extension unlocked during testing
Terminal 1 - Backend:
cd /home/ubuntu/resilient-apps/ResCanvas/backend
python3 app.py
# Should start on http://127.0.0.1:10010Terminal 2 - Frontend:
cd /home/ubuntu/resilient-apps/ResCanvas/frontend
npm start
# Should start on http://localhost:10008Verify Screen Sessions (if using):
screen -ls
# Should show:
# - rescanvas_backend
# - rescanvas_frontend
# - rescanvas_python_cacheObjective: Verify WalletConnector appears and connects to ResVault
Steps:
- Open browser: http://localhost:10008
- Login with your account
- Navigate to Dashboard
- Click "Create Room"
- Fill in room details:
- Name: Test Secure Room
- Type: Select "Secure" Important!
- Description: Testing wallet integration
- Click "Create"
- Open the newly created secure room
Expected Results:
- WalletConnector component appears in top-left area
- Shows "Connect Wallet" button
- Displays "ResVault not connected" message
- Background color is warning yellow/orange
Screenshot Location: Top-left, below the canvas header
Objective: Connect ResVault wallet to the secure room
Steps:
- Click "Connect Wallet" button on WalletConnector
- Wait for ResVault extension popup (may take 1-2 seconds)
- In the ResVault popup:
- Review the connection request
- Click "Allow" or "Connect"
- Wait for connection confirmation
Expected Results:
- ResVault popup appears
- Popup shows connection request details
- After approval, WalletConnector updates
- Background color changes to success green
- Shows "Wallet Connected" with checkmark icon
- Displays shortened public key (e.g., "0x1234...5678")
- "Disconnect" button appears
Console Logs to Check:
// Open browser DevTools (F12) → Console tab
"Wallet connected: <full_public_key_hex>"Objective: Draw a stroke and verify it's signed automatically
Steps:
- Ensure wallet is connected (from Test 2)
- Select a drawing tool (pencil, brush, etc.)
- Choose a color
- Draw a stroke on the canvas
- Release mouse button to complete the stroke
Expected Results:
- Stroke appears on canvas immediately
- No error messages
- No "Please connect wallet" warning
Console Logs to Check:
// Browser DevTools → Console
"Stroke signed for secure room: { signerPubKey: '1234...' }"
"About to submit stroke: { ... }"Network Request to Verify:
- Open DevTools → Network tab
- Filter by "strokes"
- Find the POST request to
/rooms/{roomId}/strokes - Click on the request
- Go to "Payload" or "Request" tab
- Verify payload includes:
{ "color": "#000000", "lineWidth": 5, "pathData": [...], "user": "your_username", "signature": "abc123...def456", // ← Should be present "signerPubKey": "0x1234...5678" // ← Should be present }
Objective: Verify drawing is blocked when wallet is not connected
Steps:
- In the WalletConnector, click "Disconnect"
- Confirm disconnection
- Try to draw a stroke on the canvas
Expected Results:
- WalletConnector shows "Connect Wallet" again
- Background returns to warning color
- When attempting to draw, a notification appears:
- Message: "Please connect your wallet to draw in this secure room"
- Type: Warning (yellow/orange)
- No stroke is submitted to backend
- No network request in DevTools
Console Logs:
"Failed to sign stroke: Wallet not connected for secure room"Objective: Confirm backend validates signatures correctly
Steps:
- Reconnect wallet (Test 2)
- Draw a stroke (Test 3)
- Check backend terminal logs
Expected Backend Logs:
POST /rooms/<roomId>/strokes
Status: 201 Created
Signature verified successfully for secure room
Stroke saved with signature metadata
If Signature is Invalid (manual test):
- Backend should return 400 Bad Request
- Error message: "Invalid signature" or similar
- Stroke should NOT be saved
Verify in Database:
# Connect to MongoDB
mongosh "mongodb+srv://cluster0.sonmozx.mongodb.net/rescanvas"
# Query for strokes with signatures
db.strokes.findOne({
roomId: "your_room_id",
walletSignature: { $exists: true },
walletPubKey: { $exists: true }
})
# Should return document with:
# - walletSignature: "hex_string"
# - walletPubKey: "hex_string"Objective: Test secure room with multiple users
Steps:
- Open second browser (or incognito window)
- Login with different account
- Navigate to the same secure room
- Both users connect their wallets
- User A draws a stroke
- User B observes the stroke appear in real-time
- User B draws a stroke
- User A observes the stroke
Expected Results:
- Both users can connect wallets independently
- Strokes appear in real-time for all users
- Each stroke is signed by its creator
- Signature metadata is preserved per stroke
Objective: Verify WalletConnector only appears in secure rooms
Steps:
- Create or open a Public room
- Check for WalletConnector
Expected Results:
- WalletConnector does NOT appear
- Drawing works normally without wallet
- No signature required or sent
Steps:
- Create or open a Private room
- Check for WalletConnector
Expected Results:
- WalletConnector does NOT appear
- Drawing works normally without wallet
- No signature required or sent
Steps:
- Open a Secure room
- Check for WalletConnector
Expected Results:
- WalletConnector DOES appear
- Wallet connection required for drawing
- All strokes must be signed
Check:
- Room type is "secure" (not public or private)
- Frontend build is latest:
npm run build - Hard refresh browser: Ctrl+Shift+R (Cmd+Shift+R on Mac)
- Check browser console for errors
Fix:
cd frontend
npm install
npm start
# Hard refresh browserCheck:
- ResVault extension is installed
- Extension is unlocked (click icon to verify)
- Browser console for errors
- Network tab for blocked requests
Fix:
- Click ResVault extension icon
- Unlock wallet if locked
- Try connecting again
- Check popup blocker settings
Check:
- WalletConnector shows "Connected" status
- Green background on WalletConnector
- Public key is displayed
Fix:
// In browser console:
localStorage.clear(); // Clear any stale state
location.reload(); // Reload page
// Reconnect walletCheck Backend Logs:
Error: Invalid signature
OR
Error: Signature required for secure room
Common Causes:
- Canonical JSON mismatch - Frontend and backend serialize differently
- Wrong public key - Signing key doesn't match submitted pubkey
- Timestamp drift - System clocks out of sync
Debug Steps:
// In frontend console:
const stroke = {
roomId: "room_id",
user: "username",
color: "#000000",
lineWidth: 5,
pathData: [0, 0, 10, 10],
timestamp: Date.now()
};
// Check canonical JSON:
const canonical = JSON.stringify(stroke, null, 0).replace(/\s+/g, '');
console.log('Canonical JSON:', canonical);Backend Verification:
# In backend/routes/rooms.py, add debug logging:
import json
print("Frontend canonical:", received_message)
print("Backend canonical:", json.dumps(stroke_data, separators=(',', ':'), sort_keys=True))
# Should match exactlyCheck:
- Network request succeeds (200/201 status)
- Backend logs show success
- Socket.IO connection active
- Room is not archived or view-only
Fix:
- Check browser console for Socket.IO errors
- Verify backend Socket.IO is running
- Try refreshing the canvas: Reload page
- Check MongoDB for the stroke:
db.strokes.find({ roomId: "room_id" }).sort({ timestamp: -1 }).limit(5)
-
WalletConnector Integration:
- Appears only in secure rooms
- Positioned correctly (top-left)
- Shows connection status accurately
-
Connection Flow:
- Connect button triggers ResVault popup
- Approval connects successfully
- Disconnect works correctly
- State persists during drawing session
-
Signature Flow:
- Drawing in secure room requires wallet
- Strokes are signed automatically
- Signature and pubkey sent to backend
- Backend verifies signatures correctly
- Invalid signatures rejected
-
User Experience:
- Clear error messages
- Graceful handling of missing extension
- No unexpected errors in console
- Smooth drawing experience when connected
-
Security:
- Public rooms don't require wallet
- Private rooms don't require wallet
- Secure rooms enforce wallet requirement
- Signature verification prevents tampering
Connection Time:
- ResVault popup: < 2 seconds
- Wallet connection: < 1 second
- Total: < 3 seconds
Signing Overhead:
- Per stroke: < 50ms
- Should not be noticeable to user
Network Latency:
- POST /strokes: Same as without wallet (~100-300ms)
- Signature adds negligible overhead
- Connection takes > 5 seconds
- Drawing feels laggy or delayed
- Multiple popup prompts per stroke
- Frequent disconnections
If performance is poor:
- Check ResVault extension health
- Verify browser performance (other tabs)
- Check network connection
- Review browser console for repeated errors
- API Reference: See
API_REFERENCE.mdfor endpoint details - Wallet Integration Status: See
TASK3_WALLET_INTEGRATION_STATUS.md - Testing Report: See
TESTING_REPORT.mdfor automated test results - ResVault Repository: https://github.com/apache/incubator-resilientdb-resvault
When reporting issues, include:
-
Environment:
- Browser version
- ResVault extension version
- Operating system
-
Steps to Reproduce:
- Exact actions taken
- Expected vs actual behavior
-
Logs:
- Browser console output
- Backend terminal output
- Network tab screenshots
-
Screenshots:
- WalletConnector state
- Error messages
- Network requests
Testing Guide Version: 1.0
Last Updated: October 7, 2025
Status: Complete - Ready for user verification