Troubleshooting
This guide summarizes common issues and solutions for Smart SCADA Editor, categorized by symptom for quick diagnosis.
1. Editor Fails to Start
1.1 Frontend Startup Failure
Symptom: pnpm dev:web reports errors or page is inaccessible
Diagnosis:
# 1. Check if port is occupied
netstat -ano | findstr ":5173"
# 2. Check if dependencies are installed
cd ss-editor
pnpm install
# 3. Check if workspace packages are compiled
pnpm --filter @scada-editor/core build
pnpm --filter @scada-editor/editor build
Solutions:
| Issue | Solution |
|---|---|
| Port 5173 occupied | Release port or modify port in vite.config.ts |
| Missing dependencies | Run pnpm install |
| Workspace packages not compiled | Run pnpm build to compile all packages |
| Node version too low | Upgrade to Node 18+ |
1.2 Editor White Screen
Symptom: Visiting http://localhost:5173/editor shows blank page
Diagnosis:
- Press
F12to open browser console, check error messages - Check Console tab for errors
- Check Network tab for failed requests
Solutions:
| Error Message | Cause | Solution |
|---|---|---|
Failed to fetch dynamically imported module |
Workspace package not compiled | Run pnpm build to recompile |
Cannot find module '@scada-editor/core' |
core package not compiled | pnpm --filter @scada-editor/core build |
Cannot find module '@scada-editor/editor' |
editor package not compiled | pnpm --filter @scada-editor/editor build |
Uncaught SyntaxError |
Browser version too low | Upgrade to Chrome 90+ |
CORS error |
Backend CORS config issue | Check backend main.ts CORS config |
2. Canvas Issues
2.1 Shapes Not Displaying on Canvas
Symptom: After dragging shapes to canvas, they don't display
Diagnosis:
- Check if shape is in canvas visible area (may be out of viewport)
- Check if shape is hidden (eye icon in layer panel)
- Check if shape size is 0
- Check browser console for render errors
Solutions:
| Issue | Solution |
|---|---|
| Shape out of viewport | Use Ctrl + Shift + F to fit screen, or Ctrl + 0 to reset zoom |
| Shape hidden | Click eye icon in layer panel to show shape |
| Shape size is 0 | Set correct width/height in property panel |
| Plugin not registered | Check if plugin package is compiled, run pnpm --filter @scada-editor/plugins build |
| Render backend mismatch | Check shape's render backend (Konva/SVG/CSS/Vue/Three) |
2.2 Canvas Lag
Symptom: Canvas operations are noticeably laggy, dragging shapes is not smooth
Diagnosis:
- Check number of shapes on screen (recommended max 500 per screen)
- Open browser dev tools → Performance to record performance
- Check if complex scripts are running in background
Solutions:
| Issue | Solution |
|---|---|
| Too many shapes | Split screen, use multi-page management |
| Frequent script execution | Optimize scripts, reduce unnecessary computation |
| Too many real-time bindings | Reduce real-time data bindings, increase refresh interval |
| Hardware acceleration disabled | Enable hardware acceleration in browser settings |
| Insufficient memory | Close other browser tabs, restart browser |
2.3 Canvas Zoom Abnormal
Symptom: After zooming canvas, shape positions are disordered or disappear
Diagnosis:
- Check if canvas zoom ratio is out of range (
0.1~5.0) - Check if shape coordinates are negative or extremely large
Solutions:
- Press
Ctrl + 0to reset zoom - Press
Ctrl + Shift + Fto fit screen - Check shape coordinates, ensure within reasonable range
3. Shape Rendering Issues
3.1 Shape Style Not Applied
Symptom: After modifying style in property panel, shape appearance doesn't change
Diagnosis:
- Check if correct shape is selected
- Check if property panel shows error
- Check browser console for CSS errors
Solutions:
| Issue | Solution |
|---|---|
| Shape not selected | Click shape to ensure selected state |
| CSS variable not defined | Check if CSS variable is defined in theme |
| Style overridden | Check if shape has higher priority styles |
| Hardcoded color | Replace with CSS variable (e.g., var(--primary)) |
3.2 Shape Events Not Responding
Symptom: In runtime mode, clicking shape has no response
Diagnosis:
- Check if shape has events configured (property panel → Interaction)
- Check if event actions are correctly configured
- Check browser console for script errors
Solutions:
| Issue | Solution |
|---|---|
| No events configured | Add events in property panel → Interaction |
| Script errors | Fix script syntax errors |
| Shape obscured | Adjust layer order, ensure shape is on top |
| Events disabled | Check shape's enabled state |
4. Data Binding Issues
4.1 Data Not Updating
Symptom: Shape's bound data tag doesn't update in real-time
Diagnosis:
- Check if backend Smart Data service is running
- Check if device is online and collection is enabled
- Check if WebSocket connection is normal
- Check if data source config is correct
Solutions:
| Issue | Solution |
|---|---|
| Backend not started | Start backend: cd ss-services\ss-data && pnpm dev |
| Device offline | Check device status in data platform, enable collection |
| WebSocket disconnected | Check VITE_WS_URL config, restart service |
| Data source config error | Reconfigure data binding, check device and tag selection |
| Field mapping error | Check field mapping (e.g., value → text) is correct |
4.2 Data Binding Selector Empty
Symptom: When binding data, device or tag list is empty
Diagnosis:
- Check if project is created
- Check if project has devices
- Check if device has data tags
- Check if API requests succeed
Solutions:
# 1. Confirm backend running
curl http://localhost:4000/api/v1/system/health
# 2. Check device list
curl http://localhost:4000/api/v1/devices -H "Authorization: Bearer <token>"
- If no devices: Add devices and tags in data platform (see Data Platform Quick Start)
- If API errors: Check backend logs and CORS config
5. Runtime Issues
5.1 Preview Screen Blank
Symptom: After clicking preview, screen is blank
Diagnosis:
- Check if screen has shapes
- Check if screen data is saved
- Check browser console for errors
Solutions:
- Ensure screen is saved (
Ctrl + S) - Check if screen has shapes and they're not hidden
- Restart frontend service
5.2 Script Execution Errors
Symptom: Scripts don't execute or report errors in runtime mode
Diagnosis:
- Open debug panel to view script logs
- Check script syntax
- Check if script API calls are correct
Solutions:
| Error | Cause | Solution |
|---|---|---|
SyntaxError |
Script syntax error | Fix syntax errors |
ReferenceError: xxx is not defined |
Using undefined variable | Check variable name, refer to script API docs |
TypeError: cannot read property of undefined |
Accessing null object property | Add null check |
| Script timeout | Execution too long | Optimize script, avoid long loops |
6. Save and Load Issues
6.1 Screen Save Failure
Symptom: Saving screen reports error or no response
Diagnosis:
- Check if backend service is running
- Check network connection
- Check screen data size
Solutions:
| Issue | Solution |
|---|---|
| Backend not started | Start backend service |
| Network abnormal | Check network connection |
| Data too large | Split screen, reduce shape count |
| Insufficient permissions | Check user permissions |
6.2 Screen Load Failure
Symptom: Loading screen fails or data is lost
Diagnosis:
- Check if screen data file exists
- Check if screen data JSON is complete
- Check browser console for errors
Solutions:
- Check if screen file exists in project data directory
- Restore data from backup
- Check if database is normal
7. Performance Optimization
7.1 Editor Performance Optimization
| Optimization | Action |
|---|---|
| Reduce shape count | Keep shapes per screen under 500 |
| Use layer grouping | Group by function, hide non-editing layers |
| Turn off grid | Turn off grid display for complex screens |
| Reduce real-time bindings | Reduce data bindings in design mode, enable at runtime |
7.2 Runtime Performance Optimization
| Optimization | Action |
|---|---|
| Increase refresh interval | Set data refresh interval to 2000ms or higher |
| Optimize scripts | Avoid frequent computation, use caching |
| Reduce animations | Complex animations may impact performance |
| Enable hardware acceleration | Ensure browser has GPU acceleration enabled |
8. Diagnostic Tools
8.1 Browser Developer Tools
| Tool | Purpose |
|---|---|
| Console | View error logs and script output |
| Network | Check API requests and WebSocket connections |
| Performance | Record performance, analyze lag causes |
| Application | View local storage and cache |
8.2 Editor Debug Panel
Open debug panel in runtime mode:
- Runtime Data Panel: View real-time data bound to shapes
- Performance Panel: View render frame rate, memory usage
- Script Monitor: View script execution logs
- Statistics Panel: View shape count, data source count
Related Links
- Installation Guide — Environment setup
- Configuration Guide — Parameter tuning
- Quick Start — Main workflow
- Data Platform Troubleshooting — Backend issue diagnosis