Problem: Camera access is blocked by the browser Solution:
- Click the camera icon in the browser address bar
- Select "Allow" for camera access
- Refresh the page and try again
Problem: No camera detected on the device Solution:
- Ensure your device has a camera
- Check if another application is using the camera
- Close other apps that might be using the camera
- Try refreshing the page
Problem: Camera is being used by another application Solution:
- Close other applications that might be using the camera
- Check for video conferencing apps, photo apps, etc.
- Restart your device if the issue persists
Problem: Browser doesn't support the requested camera settings Solution:
- Update your browser to the latest version
- Try using a different browser (Chrome, Firefox, Safari)
- The app will automatically fall back to supported settings
Problem: Camera API requires secure connection Solution:
- Ensure you're accessing the app via HTTPS
- For local development, use
npm run devwhich provides HTTPS
Problem: Thirdweb configuration not set up Solution:
- Get a Thirdweb Client ID from thirdweb.com
- Create a
.envfile in your project root - Add:
VITE_THIRDWEB_CLIENT_ID=your_client_id_here
Problem: Smart contract address not configured Solution:
- Deploy your smart contract to Polygon network
- Update the contract address in your environment variables
- Add:
VITE_SMART_CONTRACT_ADDRESS=your_contract_address_here
Problem: No wallet connected Solution:
- Install any supported wallet (MetaMask, WalletConnect, Coinbase Wallet, etc.)
- Connect your wallet to the Polygon network
- Ensure you have some MATIC for gas fees
- Refresh the page and try connecting again
Problem: Wallet connected to wrong blockchain network Solution:
- Switch your wallet to Polygon network
- Add Polygon network if not available:
- Network Name: Polygon
- RPC URL: https://polygon-rpc.com
- Chain ID: 137
- Currency Symbol: MATIC
Problem: Not enough MATIC for transaction fees Solution:
- Add MATIC to your wallet
- You can get test MATIC from Polygon faucet for testing
Create a .env file in your project root:
# Thirdweb Configuration
VITE_THIRDWEB_CLIENT_ID=your_thirdweb_client_id_here
# Smart Contract Configuration
VITE_SMART_CONTRACT_ADDRESS=your_contract_address_here
# Google Cloud Vision API (Optional)
VITE_GOOGLE_CLOUD_PROJECT_ID=your_project_id_here
VITE_GOOGLE_CLOUD_API_KEY=your_api_key_here- Go to thirdweb.com
- Sign up/Login to your account
- Go to Settings → API Keys
- Create a new API key
- Copy the Client ID
- Deploy your AttendanceContract.sol to Polygon network
- Copy the deployed contract address
- Update your environment variables
- Open the CameraTest component
- Check if camera devices are detected
- Try starting the camera
- Test image capture functionality
- Go to the Wallet Test page (
/wallet-test) - Try connecting different wallet types
- Verify connection status
- Run wallet tests to check functionality
- Check browser console for connection errors
- Verify wallet connection status
- Test contract interaction
- Check network configuration
- Select a session
- Start camera and capture image
- Process face recognition
- Mark attendance
- Verify blockchain transaction
NotAllowedError: Permission deniedNotFoundError: No camera foundNotReadableError: Camera in useOverconstrainedError: Unsupported settings
Smart contract not available: Contract not configuredWallet not connected: No wallet connectedWrong network: Connected to wrong blockchainInsufficient funds: Not enough MATIC for gas
- MetaMask 🦊 - Most popular Ethereum wallet
- Brave Wallet 🦁 - Built into Brave browser
- Opera Wallet 🔴 - Built into Opera browser
- Phantom 👻 - Solana wallet (with EVM support)
- WalletConnect 🔗 - Connect any mobile wallet
- Coinbase Wallet 🪙 - Coinbase exchange wallet
- Rainbow 🌈 - Beautiful mobile wallet
- Trust Wallet 🛡️ - Secure mobile wallet
- imToken - Popular in Asia
- TokenPocket - Multi-chain wallet
- SafePal - Hardware wallet integration
- Math Wallet - Multi-chain support
- Ledger - Via WalletConnect
- Trezor - Via WalletConnect
- SafePal - Direct integration
- Chrome 53+
- Firefox 36+
- Safari 11+
- Edge 79+
- MediaDevices API
- getUserMedia support
- Canvas API
- Web3/Thirdweb support
If you're still experiencing issues:
- Check the browser console for error messages
- Verify all environment variables are set correctly
- Ensure you're using HTTPS (required for camera)
- Test with the CameraTest component first
- Use the Wallet Test page (
/wallet-test) to diagnose wallet issues - Check network connectivity and firewall settings
- Use
npm run devfor local development with HTTPS - Check browser console for detailed error logs
- Test camera functionality in incognito mode
- Test wallet connections with different wallet types
- Verify blockchain connection before testing attendance
- Use test networks for development and testing
- Use the Wallet Test page (
/wallet-test) to debug wallet issues