pkimpel / retro-b5500

Web-based emulator and operating environment for the Burroughs B5500 computer system.
http://www.phkimpel.us/B5500/
MIT License
76 stars 7 forks source link

Cannot open "retro-B5500-Config" database #53

Closed PPV1953 closed 2 years ago

PPV1953 commented 2 years ago

Trying to fire up the B5500 emulator.

Getting the attached error: retro B5500 problem

I have had the emulator running fine for a long time. I haven't used it in a bit, and I got this error when trying to start it.

The error message is:

getSystemConfig cannot open "retro-B5500-Config" database: AbortError: Version change transaction was aborted in upgradeneeded event handler.

I cannot run the emulator in this current condition.

pkimpel commented 2 years ago

From your screenshot I am guessing that you are running the emulator in Google Chrome in Windows 10. The error is occurring in the Javascript IndexedDB API, which is what the emulator uses for its configuration data base and the B5500 disk units. The "upgradeneeded" event occurs in IndexedDB when the version of the data base is not equal the version being requested by the program. This gives the emulator the opportunity to do any data conversion necessary to adapt the existing data base to the emulator's new schema.

I tried running this in Chrome on Windows 10, where I have not run the emulator from the hosting site in a long time. The initial thing I see is this: image That is what I would have expected to see, since the emulator hasn't been initialized from that site before. If I then click Cancel on that dialog box, I get this: image When I click OK on that dialog, I then get this one, which is the same as yours: image Those are all expected results if the IndexedDB data base does not exist.

Are you seeing the first two dialog boxes? If so, that means that the emulator cannot find the configuration data base, which probably means it is gone. If so, it's possible that if you cleared your browsing data at some point the IndexedDB files got caught up in that. It's also possible that if you had not run the emulator in quite a while, Chrome just trashed the data on its own. It can be nasty about that, and Apple Safari is worse. The only option would be to start from scratch, create the configuration data base, create a new system configuration, and reload the disk units.

If you are not seeing those first two dialog boxes, then it's possible that the configuration data base has become corrupted in some way. That would be very difficult to try to diagnose from here.

There is another possibility, though. IndexedDB (like a lot of things in web browsers) is subject to the "same host rule," i.e., it is available only to scripts loaded from the same host that created it. www.phkimpel.us and phkimpel.us are considered to be separate hosts, even though they reference exactly the same files on the server. but http://www.phkimpel.us and https://www.phkimpel.us are also considered to be separate hosts.

Last year I installed an SSL certificate on my site. I also configured it so that any requests to http: are unconditionally redirected to the same URL, but with an https: scheme. If you are requesting http://www.phkimpel.us, that got redirected and what the emulator has been looking for is the data base associated with https://www.phkimpel.us.

As a test, I have temporarily disabled the automatic redirection on that site. Please try again, but make sure you explicitly specify http: on the URL, e.g., http://www.phkimpel.us/B5500/. Let me know one way or the other whether it works that way. This is not a change that I want to leave in place over the long term, but if it works for you I may be able to come up with a workaround just for the B5500 emulator.

PPV1953 commented 2 years ago

Hi Paul,

Thank you for such a prompt reply to my issue.

You are correct that I am running under Chrome on Windows 10.

It looks like you have nailed the cause of the problem: the "same host rule".

After you disabled the redirection, I can run the emulator on http://www.phkimpel.us. It works like it always did.

If I run the emulator on https://www.phkimpel.us I get the error.

I must have initialized my emulator before you added the SSL certificate and configured the redirect.

For your additional information, the first error occurs when I push the power on button:

First B5500 error

This does not give me any action other than OK. When I hit OK the message goes away but nothing else happens.

When I then close the console window I get the message I already sent you:

Second B5500 error

Thank you again! Please let me know what you wish me to do to help achieve a permanent fix.

-- Paul Vagnozzi

pkimpel commented 2 years ago

Paul V -- thanks for your reply and confirming my suspicion. As to a permanent fix, what I'd really like to do is simply reinstate mandatory https: redirection, but that may not be practical for the retro-b5500 emulator -- there are probably other people in the same position as you, whether they realize it yet or not.

I think a better solution, at least for now, will be to inhibit https redirection just for www.phkimpel.us/B5500/. That would allow you to continue working as is by using an http: scheme, but anyone who wants to could use https:. The other parts of that server could then continue to redirect to https:. It's not like there's any sensitive data going back and forth when you load the emulator from that site.

Anyone who wants to can, of course, switch to using https, but to do that they would need to reinitialize the emulator as described in the Getting Started wiki page. Before doing so, they can dump the contents of the disk filesystem to a scratch tape using a SPO command like this:

CC DUMP TO TAPENAME =/=; END

There are a few system files that don't get dumped, like SYSTEM/LOG. After they reinitialize the emulator under the https URL, cold start, and load the basic system files, they can then restore that dump using this:

CC ADD FROM TAPENAME =/=; END

which will reload just the files that are not already present.

PPV1953 commented 2 years ago

Hi Paul,

I am going to reinitialize my emulator so that it works with the https connection.

I have all of my jobs to initialize the DC and TSS systems.

I have dumped the contents of the disk file system as you directed, and have tested and verified loading files from these tapes.

It may be a few days before I have time to do this. I will let you know when I am running on the https connection.

-- Paul Vagnozzi

PPV1953 commented 2 years ago

Hi Paul,

I have rebuilt my emulator to run on the https connection.

There is no need for you to maintain a special connection for me.

Thanks again,

-- Paul Vagnozzi