Script mismatch when adding mod to existing save

Place to get help with not working mods / modding interface.
Post Reply
asdff45
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Sun Aug 07, 2016 1:23 pm
Contact:

Script mismatch when adding mod to existing save

Post 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?
Last edited by asdff45 on Wed Dec 25, 2019 9:21 pm, edited 5 times in total.

PyroFire
Filter Inserter
Filter Inserter
Posts: 356
Joined: Tue Mar 08, 2016 8:18 am
Contact:

Re: Script mismatch when adding mod to existing save

Post 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.

asdff45
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Sun Aug 07, 2016 1:23 pm
Contact:

Re: Script mismatch when adding mod to existing save

Post 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.

Honktown
Smart Inserter
Smart Inserter
Posts: 1025
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Script mismatch when adding mod to existing save

Post 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.
I have mods! I guess!
Link

asdff45
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Sun Aug 07, 2016 1:23 pm
Contact:

Re: Script mismatch when adding mod to existing save

Post by asdff45 »

It is tested on my ubuntu 18.04 machine. The server was also an Ubuntu 18.04 where the log is from.

PyroFire
Filter Inserter
Filter Inserter
Posts: 356
Joined: Tue Mar 08, 2016 8:18 am
Contact:

Re: Script mismatch when adding mod to existing save

Post by PyroFire »

PyroFire wrote:
Wed Dec 25, 2019 5:58 pm
can other people join it?

asdff45
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Sun Aug 07, 2016 1:23 pm
Contact:

Re: Script mismatch when adding mod to existing save

Post 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

asdff45
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Sun Aug 07, 2016 1:23 pm
Contact:

Re: Script mismatch when adding mod to existing save

Post 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 :(

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2633
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Script mismatch when adding mod to existing save

Post 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.
Image

Transport Belt Repair Man

View unread Posts

asdff45
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Sun Aug 07, 2016 1:23 pm
Contact:

Re: Script mismatch when adding mod to existing save

Post 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 :)

Post Reply

Return to “Modding help”