[x] Checked the logs and have uploaded a log file and provided a link because I found something suspicious there. Please do not post the log file in the topic because very often something important is missing.
I’m submitting a…
[x] Regression (a behavior that stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ ] Documentation issue or request
Current behavior
When uploading assets using the sq sync in command we encounter the following errors on some of our assets:
Uploading f71da12b-689a-4a50-a5b1-604...failed: Validation error: Bu dosya formatının yüklenmesine izin verilmemektedir.
The error message appears to be in Turkish.
Please notice that we have not changed the assets or the process. The error seems to appear randomly across our uploaded assets.
Expected behavior
It should upload the asset as normal and return something like
actually i was just able to find it - we are unsure where this came from as we sync our apps from code and we have no such code. Is it possible it leaked from another user’s app?
so it looks like this was added to all of our apps in two different accounts and it’s not in any of our previous back ups.
@Sebastian is it possible that this (asset scripting) was introduced recently and somehow by accident all of the apps received one user’s setting? or was it a migration go wrong ?
public sealed record AssetScripts
{
public string? Create { get; init; }
}
So from the compiler perspective this object is immutable. So I thought “When this is immutable we do not need multiple instances of this object and can keep one in memory”.
So I added this field:
public sealed record AssetScripts
{
public static readonly AssetScripts Empty = new AssetScripts();
public string? Create { get; init; }
}
And used it in the app object:
class App
{
public AssetScripts AssetScripts { get; set; } = AssetScripts.Empty;
}
But when reading the value from the database, it does not create a new instance, it reuses the instance. And for the deserializer the object is mutable. So therefore the asset scripts have been leaked from one app to another.