# 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 saves two kinds of changes in two different ways:
- **Plan edits** go into a draft that is saved on your device. Nothing goes live until you publish the draft, and your team sees your changes only after you publish.
- **Everything else** (projects, teams, settings, and task updates made from Slack or by an AI agent connected to YAPL) is saved to the server as soon as you confirm it.

Open pages receive your team's published changes over a live connection. The connection badge in the top bar shows its state: **Live**, **Connecting...**, **Offline** or **Error**. The badge is shown on tablets and computers.

A draft stays on the device and browser where you created it. It does not follow you to another device until you publish it.

## Changes Not Saving

### Symptoms

- You make changes but they disappear
- Data reverts to previous state
- "Save failed" errors
- Your teammates don't see your plan changes

### Solutions

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

2. **Check that you published your draft**
   - Plan edits stay in your draft until you publish them
   - Your teammates see them only after you publish

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

4. **Try again**
   - Click Save or Publish again
   - Wait for the confirmation

5. **Clear browser cache**
   - May fix corrupted cached files
   - Reload and retry
   - Clear only cached images and files. Clearing site data or cookies for YAPL also deletes any draft you have not published yet

### Preventing Data Loss

- Wait for save and publish confirmations
- Don't close the browser while a save or publish is running
- Publish your draft when you finish a piece of work
- Don't clear site data while you have an unpublished draft

## 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 the connection badge**
   - **Live** means updates are arriving
   - **Offline** or **Error** means they are not. YAPL reconnects by itself once your connection is back

3. **Check whether you are in a draft**
   - While you edit a draft, changes made elsewhere are not pulled into it automatically
   - They are marked in your plan. You can absorb them into your draft, or they are merged when you publish

4. **Log out and back in**
   - Reestablishes the connection

5. **Clear browser cache**
   - Removes stale cached files
   - 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. **Publish on the first device**
   - A draft stays on the device where you created it
   - Publish it before you continue on another device

2. **Refresh on the other device**
   - Loads the version you just published
   - Start a new draft from there

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

### Multi-Device Best Practices

- Refresh before starting work
- Publish your draft before switching devices
- Wait for the publish confirmation
- Don't keep drafts of the same plan open on two devices

## Conflict Resolution

### What Are Conflicts?

Conflicts occur when:
- Someone else publishes a new version of the plan while you work on your draft
- A task you changed in your draft was also changed elsewhere, for example from Slack or by an AI agent
- A task you edited was deleted elsewhere

### How YAPL Handles Conflicts

- Tasks changed elsewhere are marked in your plan: changed elsewhere, created elsewhere, deleted elsewhere, or a conflict when you changed the same task too
- Changes that don't conflict can be absorbed into your draft, or they are merged when you publish
- When you publish, YAPL lists the changes made elsewhere. For each conflict you choose whether to keep your version or the one made elsewhere
- If someone else published a new version while you were editing, YAPL stops and lets you choose: save your draft as a new version, look at the other version first, export your plan as XML, keep your draft, or discard your changes

### 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. **Publish often**
   - Smaller drafts mean fewer conflicts
   - Others see your 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 your device half a second after each edit
- **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 half a second after each edit
3. **CPM keeps calculating** - Runs locally in your browser
4. **Your work is kept** - If the browser crashes, at most the last half second of work is lost

### Coming Back Online

When connection returns:
1. **Review your draft** - Check your changes look correct
2. **Click Publish** - Your changes go live
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. **Live connection blocked**
   - YAPL keeps a long-lived connection open for live updates
   - Some corporate firewalls and proxies close or hold back these connections

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

3. **Network restrictions**
   - Some networks block long-lived connections
   - Try different network

### Solutions

1. **Check firewall settings**
   - Allow YAPL's long-lived connections (Server-Sent Events and WebSockets)
   - 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. Publish any draft you want to keep. Clearing site data deletes the drafts saved on this device
2. Clear browser cache
3. Clear site data for YAPL
4. 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. Open the plan again on the same device and browser. An unpublished draft stays there until you publish or discard it
2. Check the plan's earlier versions. Each publish is kept as a version
3. Check the activity log for recent changes
4. Ask team members if they saw your changes
5. 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 and publish confirmations
   - Check for error messages

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

5. **Publish your drafts**
   - Before you switch devices
   - Before you clear browser data

## 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