# Sync Issues (https://yapl.app/en/docs/troubleshooting/sync-issues)

# Sync Issues

Solutions for data not updating, changes not saving, and synchronization problems between devices.

## Understanding Sync in YAPL

YAPL syncs data automatically:
- Changes save to the server in real-time
- Other users see updates without refreshing
- Multiple devices stay in sync

When sync fails, you may see stale data or lost changes.

## Changes Not Saving

### Symptoms

- You make changes but they disappear
- Data reverts to previous state
- "Save failed" errors

### Solutions

1. **Check internet connection**
   - Open another website to verify
   - Reconnect if disconnected

2. **Refresh the page**
   - Saves any pending changes
   - Loads latest data from server

3. **Check for error messages**
   - Look for red notifications
   - Note specific error text

4. **Try saving again**
   - Click save button again
   - Wait for confirmation

5. **Clear browser cache**
   - May fix corrupted cached data
   - Reload and retry

### Preventing Data Loss

- Wait for save confirmations
- Don't close browser during saves
- Keep stable internet connection
- Refresh periodically on long sessions

## Data Not Updating

### Symptoms

- Other users' changes not appearing
- Stale data shown
- Need to manually refresh to see updates

### Solutions

1. **Refresh the page**
   - Forces reload from server
   - Gets latest data

2. **Check real-time connection**
   - Look for connection indicator
   - Reconnect if disconnected

3. **Log out and back in**
   - Reestablishes connection
   - Clears local state

4. **Clear browser cache**
   - Removes stale cached data
   - Fresh load from server

## Multi-Device Sync Issues

### Symptoms

- Different data on different devices
- Changes on one device not appearing on another
- Conflicting information

### Solutions

1. **Refresh on all devices**
   - Ensures latest data everywhere
   - Do this after making changes

2. **Check internet on all devices**
   - Both need working connections
   - Mobile data may be slower

3. **Avoid simultaneous editing**
   - Edit same items on one device at a time
   - Changes from one device should sync before editing on another

### Multi-Device Best Practices

- Refresh before starting work
- Complete edits before switching devices
- Wait for sync confirmation
- Don't edit same content simultaneously

## Conflict Resolution

### What Are Conflicts?

Conflicts occur when:
- Two people edit the same item simultaneously
- You edit offline and sync later
- Network issues during save

### How YAPL Handles Conflicts

- Last save typically wins
- Some conflicts may show warnings
- Manual resolution may be needed

### Preventing Conflicts

1. **Communicate with team**
   - Let others know what you're editing
   - Coordinate on shared items

2. **Refresh before editing**
   - Get latest version first
   - Reduces conflict chance

3. **Save frequently**
   - Smaller changes = fewer conflicts
   - Others see updates sooner

## Offline Behavior

### Full Offline Support for Plans

YAPL supports **full offline editing** for plans:

- **All editing works** - Tasks, dependencies, progress, calendar
- **Auto-save enabled** - Changes save to device every 500ms
- **Critical path works** - CPM calculations run locally
- **Undo/Redo available** - Full history preserved

**Requirement:** Load the plan and create a draft while online first.

### Going Offline Unexpectedly

If you lose connection while editing a plan:
1. **Keep working normally** - Nothing changes in the interface
2. **Changes auto-save** - Saved to your device every 500ms
3. **CPM keeps calculating** - Runs locally in your browser
4. **No data loss** - Maximum 500ms of work could be lost on crash

### Coming Back Online

When connection returns:
1. **Review your draft** - Check your changes look correct
2. **Click Publish** - Sync changes to the cloud
3. **Wait for confirmation** - Ensure publish succeeds
4. **Team sees updates** - Others can now view your changes

### What Doesn't Work Offline

| Action | Why |
|--------|-----|
| Open new plan first time | Data stored in cloud |
| Create new plan | Server generates IDs |
| Publish draft | Writes to database |
| Load different versions | Fetches from server |
| Real-time updates | Requires connection |

See [Offline Editing Guide](/docs/user-guides/plans/offline-editing) for complete details.

## Browser-Specific Sync Issues

### Chrome

1. Check if site data is blocked
   - Settings > Privacy > Site Settings
   - Ensure YAPL can store data

2. Disable data saver
   - May interfere with sync

### Safari

1. Check cross-site tracking settings
   - May block necessary connections

2. Disable content blockers for YAPL

### Firefox

1. Check Enhanced Tracking Protection
   - May block sync features
   - Add exception for YAPL

## Real-Time Updates Not Working

### Symptoms

- Don't see others' changes in real-time
- Need to refresh to see updates
- No live collaboration feeling

### Causes

1. **WebSocket connection failed**
   - Firewall may block WebSockets
   - Corporate network restrictions

2. **Browser compatibility**
   - Old browsers may not support real-time
   - Update to latest version

3. **Network restrictions**
   - Some networks block WebSocket
   - Try different network

### Solutions

1. **Check firewall settings**
   - Allow WebSocket connections
   - Contact IT if corporate network

2. **Update browser**
   - Latest browsers have better support

3. **Try different network**
   - Test on mobile data or home network

## Notification Sync Issues

### Not Receiving Notifications

1. Check notification settings in YAPL
2. Check browser notification permissions
3. Ensure you're logged in
4. Refresh the page

### Delayed Notifications

- Network latency can cause delays
- Server load may affect delivery
- Refresh to catch up

## Troubleshooting Steps

### Step 1: Verify Connection

1. Check internet connection
2. Try loading another website
3. Restart router if needed

### Step 2: Refresh and Retry

1. Refresh the page (Ctrl+R)
2. Try the action again
3. Wait for confirmation

### Step 3: Clear Cache

1. Clear browser cache
2. Clear site data for YAPL
3. Refresh and log in again

### Step 4: Test Different Browser

1. Try incognito mode
2. Try different browser
3. Identify if browser-specific

### Step 5: Check Device

1. Try different device
2. Try different network
3. Identify if device-specific

## Data Recovery

### Lost Changes

If changes were lost:
1. Check if you can recreate from memory
2. Ask team members if they saw your changes
3. Check activity log for last saved version
4. Contact support for data recovery assistance

### Corrupted Data

If data appears corrupted:
1. Don't make further changes
2. Take screenshots
3. Contact support immediately
4. Don't clear cache until advised

## Prevention Best Practices

### For Reliable Sync

1. **Maintain stable connection**
   - Use wired when possible
   - Avoid network switching

2. **Refresh regularly**
   - Start of day
   - After long periods away
   - Before important edits

3. **Watch for confirmations**
   - Wait for save confirmations
   - Check for error messages

4. **Coordinate with team**
   - Communicate about shared edits
   - Avoid simultaneous changes

## Still Having Sync Issues?

If problems persist:

1. Note what actions cause the issue
2. Check if it affects all data or specific items
3. Test on different devices/browsers
4. [Contact support](/contact) with:
   - Description of the problem
   - Steps to reproduce
   - Browser and device info
   - Any error messages
   - Screenshot of the issue