SWAG_MIGRATION_RUN_EXCEPTION in logs while migrating from shopware5 to shopware6 - migration

PHP Version:
8.1
Shopware Version:
6.4.13
Expected behaviour:
Data migrated successfully and visible in the backend/frontend.
Actual behaviour:
Migrated data doesn't appear to visible in backend/frontend and there are errors within the logs.
How to reproduce:
I am trying to migrate from shopware 5.7 with demo-data to shopware 6.4 in my local development environment within a virtual environment.
I had followed all instructions mentioned in the site
https://docs.shopware.com/en/migration-en/Migrationprocess?category=migration-en/shopware5
I had used local gateway setup for this.
Although the status of migration is 'success'. No migrated data is visible in backend of shopware 6.4 and there are errors within the logs in migration process. I have attached a log for reference.
Error Log:
[error] SWAG_MIGRATION_RUN_EXCEPTION
An exception occurred
Entity: language, sourceId: -
SwagMigrationAssistant\Migration\Logging\Log\ExceptionRunLog::__construct(): Argument #4 ($sourceId) must be of type ?string, int given, called in /var/www/webdev/shopware56/custom/plugins/SwagMigrationAssistant/Migration/Service/MigrationDataConverter.php on line 144
[error] SWAG_MIGRATION_RUN_EXCEPTION
An exception occurred
Entity: category, sourceId: -
SwagMigrationAssistant\Profile\Shopware\Converter\ShopwareConverter::getSourceIdentifier(): Return value must be of type string, int returned
[error] SWAG_MIGRATION_RUN_EXCEPTION
An exception occurred
Entity: customer_group, sourceId: -
SwagMigrationAssistant\Profile\Shopware\Converter\ShopwareConverter::getSourceIdentifier(): Return value must be of type string, int returned
[error] SWAG_MIGRATION_RUN_EXCEPTION
An exception occurred
Entity: sales_channel, sourceId: -
SwagMigrationAssistant\Profile\Shopware\Converter\ShopwareConverter::getSourceIdentifier(): Return value must be of type string, int returned

The cause of your problem is the use of PHP 8.1 on the Shopware 5 system.
Since PHP 8.1, the data for a SELECT is no longer returned as PHP strings by default, but now has correct data types such as integer or float. See https://www.php.net/manual/de/migration81.incompatible.php#migration81.incompatible.pdo
As a workaround, you could downgrade to PHP 8.0 or add the following to your config.php in Shopware 5:
...
'db' => [
'username' => '<your-credentials>',
'password' => '<your-credentials>',
'dbname' => '<your-db-name>',
'host' => '<your-host>',
'driverOptions' => [
\PDO::ATTR_STRINGIFY_FETCHES => true,
],
],
...
With Shopware 5.7.15 this will be the default setting.
If the direct local database connection is used, you can try to add the driverOptions parameter here:
https://github.com/shopware/SwagMigrationAssistant/blob/4.2.5/Profile/Shopware/Gateway/Connection/ConnectionFactory.php#L55-L62

Related

In STS, server up error : org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class

In STS after converting from Java 11 to Java 17. While making the server up, getting the following error.
{"#timestamp":"2022-12-21T11:09:36.129-08:00","#version":"1","message":"Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.package.name]","logger_name":"org.springframework.context.annotation.AnnotationConfigApplicationContext","thread_name":"main","level":"WARN"}
{"#timestamp":"2022-12-21T11:09:36.147-08:00","#version":"1","message":"\r\n\r\nError starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.","logger_name":"org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLogger","thread_name":"main","level":"INFO"}
{"#timestamp":"2022-12-21T11:09:36.193-08:00","#version":"1","message":"Application run failed","logger_name":"org.springframework.boot.SpringApplication","thread_name":"main","level":"ERROR","stack_trace":"org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class
Build is successfull. But unable to up the server. Is any config or dependency are missing ? Converting from java 11 to Java 17 in STS.

NET 7 - Identity Server - Unable to load one or more of the requested types. Method 'get_ServerSideSessions'

Getting the following exception in
app.UseEndpoints(endpoints => { endpoints.MapRazorPages(); }):
System.Reflection.ReflectionTypeLoadException: 'Unable to load one or more of the requested types.Method 'get_ServerSideSessions' in type 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationDbContext`1' from assembly 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.'
After updating the nuget package Duende.IdentityServer.EntityFramework to version 6.2.0. and Duende.IdentityServer.Storage to 6.2.0. Reverting both package back to 6.0.4 resolves this error , seems like there is an incompatibility introduced. If anyone has a fix so I can upgrade this package is appreciated.

System.Exception: Type VstsSyncMigrator.Engine.WorkItemMigrationContext not found

enter image description here
I am using the version of 11.5.17.0 and facing the error while running the json file as follows. Please check the attcahed file aslo.
Error : System.Exception: Type VstsSyncMigrator.Engine.WorkItemMigrationContext not found.
at MigrationTools.Engine.Containers.ProcessorContainer.Configure() in D:\a\1\s\src\MigrationTools\Engine\Containers\ProcessorContainer.cs:line 60
at MigrationTools.MigrationEngine.Run() in D:\a\1\s\src\MigrationTools\MigrationEngine.cs:line 85
at MigrationTools.ExecuteHostedService.b__6_1() in D:\a\1\s\src\MigrationTools\ExecuteHostedService.cs:line 45
[17:05:56 INF] Application is shutting down...
[17:05:56 INF] Application Ending
[17:05:56 INF] The application ran in 00:00:01.9911715 and finished at 10/09/2020 17:05:56
It looks like you are using an outdated configuration.json format.
Changed config design to have only the Name and not FullName of the
class. Remove MigrationTools.Core.Configuration.FieldMap. and
MigrationTools.Core.Configuration.Processing. from the config leaving
only the Name of the class in ObjectType field.
This was updated in v10.1 and the easiest way to get around it is to create a new empty config using migrator.exe init and then port your customisations into the new format.

Bundle chunks are not loading in iPhone for stencil theme in bigcommerce

I am using Chiara theme based on stencil in bigcommerce and here is the link of it :
https://bg-test.mybigcommerce.com
I have done few customizations and its working properly in desktops and andriod devices but some how its giving following error in iPhone on browser console :
[Error] The source list for Content Security Policy directive 'script-src' contains an invalid source: ''strict-dynamic''. It will be ignored.
[Error] The source list for Content Security Policy directive 'script-src' contains an invalid source: ''strict-dynamic''. It will be ignored. (x2)
[Error] The source list for Content Security Policy directive 'script-src' contains an invalid source: ''strict-dynamic''. It will be ignored.
[Error] Failed to load resource: the server responded with a status of 404 () (theme-bundle.main.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 () (theme-bundle.chunk.4.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 () (theme-bundle.chunk.2.js.map, line 0)
If you go to following url : https://bg-test.mybigcommerce.com/graco-extend2fit-convertible-car-seat/
The datepicker should work but its not working on iPhone and due to the above errors
I have tried to remove the devtool: 'source-map' from webpack but its the same error on iPhone
Please not that it is working in desktop safari but it is not working on iphone on safari, chrome both

Deploy archiva on WildFly 8.1

First of all, i want to say i'm new in this.
I'm using WildFly 8.1, and i want to have a common repository of my own for all of my future projects (also working with maven), so i thought using Archiva (version 2.1.1). I've downloaded the .WAR file, deployed it in WildFly server, but when I try to enable, it throws an error. Here I copy the error:
Failed to enable apache-archiva-2.1.1.war.
Unexpected HTTP response: 500
Request
{
"address" => [("deployment" => "apache-archiva-2.1.1.war")],
"operation" => "deploy"
}
Response
Internal Server Error
{
"outcome" => "failed",
"failure-description" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"apache-archiva-2.1.1.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"apache-archiva-2.1.1.war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"apache-archiva-2.1.1.war\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.ClassNotFoundException: org.apache.archiva.redback.integration.taglib.jsp.IfConfiguredTag from [Module \"deployment.apache-archiva-2.1.1.war:main\" from Service Module Loader]
Caused by: java.lang.ClassNotFoundException: org.apache.archiva.redback.integration.taglib.jsp.IfConfiguredTag from [Module \"deployment.apache-archiva-2.1.1.war:main\" from Service Module Loader]"}},
"rolled-back" => true
}
There is an issue with 2.1.1 release. I missed to remove a tld declaration file whereas we don't use anymore jsp/tld :-(
It's fixed in master.
You can try that with a dev version build here: https://builds.apache.org/view/A-D/view/Archiva/job/archiva-master-build/
This will be fixed for 2.1.2 version