[BUG-12910] Multiple operations without saving to gateway leads to "null" view json and causes pseudo-project loss (no-project)?

Hello,

TL;DR: Designer saved a view to the gateway with json contents “null”, Ignition “lost” all other views. Also a hash (#, 0x23) got replaced with a dash (-, 0x2D) in db_backup_sqlite.idb, maybe irrelevant?

I was reorganizing the Perspective Views folder structure, creating new folders, renaming folders and views, changing the associated URLs, redirecting Flex Repeater nested views, etc, and upon my final name change, opened the view in question and found it blank. I assumed I had once again pushed the beta to a breaking point so I pressed the save button on the designer, saw it succeed, and checked the gateway CPU usage - pegged at 100%, like I’ve seen a few times before in other scenarios. Watched it for a bit without any change, and then killed the offending “Zulu Platform…” process, as usual. I’ve historically not had any (noticeable) data loss doing this, and the system was nearly unresponsive, so I didn’t think to try an export/backup. Alas, upon coming back up, I found that the gateway seemed to have ‘lost’ my entire project - previously configured URLs showed “A Perspective project named “hunterdg” does not exist on this Gateway.” and the web UI showed “You haven’t created any Perspective projects yet!”. The Designer found my project though, and allowed me to launch it, but when opened, all views showed “no-project”.

I backed up the ‘corrupted’ gateway state and took a brief look at the archive, found it seemed to have all my recent folder structure changes and new project files from the day’s development, but the View that crashed the gateway had “null” in its view.json, so I deleted that View folder.
Fired up Beyond Compare on the old vs new backups to check if anything else obvious was corrupted, found a dash instead of a hash (0x2D instead of 0x23) in the db_backup_sqlite.idb, replaced it with a #, restored the ‘fixed’ gwbk, imported the ‘corrupted’ view from a previous backup, everything back to normal.

1 Like

Do you have a copy of that view or project backup you can send us? What beta version?

Sent via PM just now. 8.0.0-beta0 (b2019021802)

Thanks. I’m not seeing any issue opening the project or seeing other views aside from the one with the null JSON on the latest build.

We’ll have to try and figure out how the null view.json got saved in the first place though.

That’s strange, I just restored the backup to my dev machine (macOS, b2019022608) and I see “You haven’t created any Perspective projects yet!”

Huh, yeah I see that too. I was just opening the designer before.

I tried to open a random selection of views in the Designer, and all i get is “no-project” in the desgn window.

Kevin,

This is probably not related, but I wanted you to be aware that I saw this functionality... albeit for a different reason. I didn't delve nearly as deep as @hunterdg

Okay, we’ve got a ticket here to look into this.

I was seeing that “no-project” thing as well, but then I restarted the gateway and it started working so I wasn’t sure if it was related to the view or if it was something buggy about the restore.

1 Like

Thanks for the extra info @joe.friedrich

Interesting, I can’t get anything but “no-project” even after a gateway restart (sudo ignition restart)

I got the ‘no-project’ after just doing the nightly build update this morning. One of my projects remains, but the other is giving me the ‘no-project’ on every view. I’ve tried restoring to a gateway backup just before the upgrade but get nothing.

@christopher.green It’s most likely not a problem with the project, rather it sounds like the version is the issue. We’re investigating.

I don’t know if this applies or not, but the project that no longer works had both vision and perspective windows/views built and the project that still works is perspective only.

@cmallonee The vision part of the project I can still see and edit, and I can still launch the vision application without issue as a client.

I talked to a co-worker about this, and he experienced the almost exact same issue OP posted on the Feb20 version of Ignition8. (Unlike me, he did not directly edit the JSON. Just moved things around, created views, deleted views, etc.) Hope that helps! :gift:

Installed latest nightly and another project seems to have imploded.

Things I did that may have caused this:
-Copied JSON from one project to another.
-Copied JSON from one view to another.
-Did experience a failure when copying JSON from one view to another at one point. Copied the whole view and did some renaming as a workaround.

Will keep you informed on what I manage to recover/save/fix/find/etc.

I ran into the same issue and have come up with a temporary solution:

  1. On the gateway, navigated to \Inductive Automation\Ignition\data\projects
    and copied the project I was working on (the one that no longer works) to my local machine.
  2. Took a backup of the gateway.
  3. Restored the most recent gateway back up that my project was working on.
  4. Moved the project files I copied from step 1 to the gateway.

Step 4 was finicky. I could not move the top level project folder into the Inductive Automation\Ignition\data\projects\ directory - this resulted in the same behavior has the original problem. I tried replacing the folder one level down - com.inductiveautomation.perspective but the client could not find these views as a result. SO, I ended up manually copying each actual file into its correct directory (I WAS able to copy SOME folders to save time but it seemed to be trial and error). In the end I copied every file except the ones from com.inductiveautomation.vision (I’m not using Vision), and the project.json file.

It was tedious but a lot faster than trying to redo all the work I did.
Hope this helps either solve the issue or at least gives people a workaround for now.

Note: I only cared about perspective items, so that’s all I focused on.

  1. Created a VM
  2. Installed newest nightly on VM
  3. Restored VM from ‘Production’ backup
  4. Downloaded Project Backup
  5. Manually copied com.inductiveautomation.perspective folder from ProjectBackup.zip into C:\Program Files\Inductive Automation\Ignition\data\projects\JoeDev\com.inductiveautomation.perspective
    1. Tested in the Designer. This failed.
  6. Manually copied individual style-classes and views folders.
    1. Tested in the Designer. This sort of worked.
  7. Manually copied page-config, session-props, and tag-drop-settings folders.
    1. Tested in the Designer. This sort of worked.
  8. Manually copied general-properties folder.
    1. Tested in the Designer. This worked after messing about opening windows. It’s still buggy, but seemed to be in a functional state.
  9. Took a project backup and restored to ‘Production.’
    1. This completely failed. No change.
    2. No amount of copying managed to get it to work on ‘Production’. This points back to @cmallonee saying that it’s an issue on the Ignition server side.

Sorry, giving up and restoring from yesterday’s backup.

It looks like I have run into the same issue.

I have a perspective app I have been developing for a few days and it was starting to get especially good! It seems to have died a horrible death. Yes I know it’s beta, yes I actually did backup my work several days in a row but all backups restore corrupted.

Background:

  1. This happened when I decided to stop and start the gateway from the services after running for a solid week with ongoing development

  2. Unfortunately when I restore from several backups going back up to four days back they all have the issue, it seems the project was running OK in memory but the backups are all corrupted or don’t load properly.

Behavior:

  1. When the gateway starts in the log "ProjectCache" reports "Unable to start Perspective project IADemoProject". The error is just a null pointer exception, i will attach it below.
  2. On the gateway webpage under Home → Perspective Session Launcher (/web/perspective-launcher?21) It says “You haven’t created any Perspective Projects yet!”
  3. When you launch the designer the perspective screens are all there but when you edit them they all say "no-project " on each screen

Ignition version - Was running the install from 02/14, also tried on the latest 02/28 and no go

OS Windows server 2012 R2 Datacenter and Windows 7 -x64

Let me know if you would like me to PM the project to you to take a look.