Page 1 of 1

Script mismatch when adding mod to existing save

Posted: Wed Dec 25, 2019 5:17 pm
by asdff45
I've now got two different reports, that my mod is causing the error

Code: Select all

`459.779 Error ClientMultiplayerManager.cpp:101: MultiplayerManager failed: "" + multiplayer.script-mismatch + "
" + "`
when adding it to an existing save, where it previously was not used.

Screenshot of the error:
Image

I also found a way to reproduce this now:
- Download the zip-file: https://drive.google.com/file/d/1VWVrPs ... sp=sharing
- Move the mods directory from the zip-file into an factorio headless server
- Start the server with the save (also included in the zip-file)
- Then sync a client with the server and connect to it. The Client should not be able to connect to the server, with the script-mismatch error.

The original server and client logs are also included in the zip. I tested it mostly on my Ubuntu 18.04 machine.

What i checked so far:
- The checksums in the logs are all identical.
- The checksum of the mod-zip-files are identical on server and client
- The zip file integrity has no errors (tested with unzip -t)

My mod: https://mods.factorio.com/mod/belt-balancer
source-code: https://github.com/knoxfighter/belt-balancer

Why is this script-mismatch occurring, although the scripts and modfiles are surely identical? What can i do to prevent this in the future?
And why does saving and loading the save (aka. restarting the server) fixes the error?

Re: Script mismatch when adding mod to existing save

Posted: Wed Dec 25, 2019 5:58 pm
by PyroFire
If you've touched the base game files, e.g. those in steamapps/common/Factorio/data/base/ or date/core/ then it's possible you have inadvertently edited the base game files causing checksum mismatch (on level.dat - not your mods files)
Same goes on the other end - something on the server may be altered. can other people join it?

Basically reinstall factorio. *Worst case scenario.

Re: Script mismatch when adding mod to existing save

Posted: Wed Dec 25, 2019 6:19 pm
by asdff45
Was an interesting theory, but this happens also happens, on a completely fresh installation of factorio with a fresh dedicated-server and a newly created save.

Re: Script mismatch when adding mod to existing save

Posted: Wed Dec 25, 2019 6:40 pm
by Honktown
What OS/filesystem is the server and client? Is it possible there's something odd going on with how the server handles files (moving/sandboxing/flushing to disk/etc)? FreeNAS/normal Linux's is all I'd have knowledge about.

Re: Script mismatch when adding mod to existing save

Posted: Wed Dec 25, 2019 9:20 pm
by asdff45
It is tested on my ubuntu 18.04 machine. The server was also an Ubuntu 18.04 where the log is from.

Re: Script mismatch when adding mod to existing save

Posted: Thu Dec 26, 2019 5:15 pm
by PyroFire
PyroFire wrote:
Wed Dec 25, 2019 5:58 pm
can other people join it?

Re: Script mismatch when adding mod to existing save

Posted: Thu Dec 26, 2019 9:08 pm
by asdff45
More tests results, i tested it on all my available hardware:
- Ubuntu 18.04 Client -> Ubuntu 18.04 Headless Server
- Ubuntu 18.04 Client -> Windows 7 Server
- Windows 7 Client -> Ubuntu 18.04 Headless Server
- Windows 7 Client -> Windows 7 Server
- Ubuntu 18.04 Client -> Windows Server 2016 Standard Server
- Windows 7 Client -> Windows Server 2016 Standard Server

All result in the described error.

And i currently don't have anybody that can join, except me. So i setup a Server with this error, so you can try to connect yourself: crosant.de:10258
Server is Factorio 0.17.79

Re: Script mismatch when adding mod to existing save

Posted: Fri Jan 03, 2020 1:33 pm
by asdff45
Anybody has any idea, whats going on here?
And also that log output feels weird, like, the string concatenation is broken and not all information is printed :(

Re: Script mismatch when adding mod to existing save

Posted: Fri Jan 03, 2020 2:02 pm
by steinio
Have you tried it without the migration files?

You fiddle with the globals, maybe the game has an issue with this during migration.

Sounds more like a case for on_configuration_changed.

Re: Script mismatch when adding mod to existing save

Posted: Fri Jan 03, 2020 5:21 pm
by asdff45
yep, you were correct, the migration files are the problem.

As soon as i have a `require` in one migration file, the script mismatch occurs.

That is definitely a bug inside factorio, i will create a bugreport for that. Thanks for the thoughts and the help :)