Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export Wizard bombs out on some project images #2562

Closed
fenneh opened this issue Jun 23, 2016 · 8 comments
Closed

Export Wizard bombs out on some project images #2562

fenneh opened this issue Jun 23, 2016 · 8 comments
Assignees
Labels
kind/bug This issue represents a verified problem we are committed to solving
Milestone

Comments

@fenneh
Copy link

fenneh commented Jun 23, 2016

It seems you can upload multitudes of possible images for Project Icons. When running the export wizard it will bomb out due to MimeTyping.

One example -

-------------------------------------------------------------------------------
Error: Mimetype not currently mapped: 'application/xml'
-------------------------------------------------------------------------------
Full error details are available in the log files.
At: D:\Octopus\Logs
===============================================================================
Mimetype not currently mapped: 'application/xml'
System.Exception: Mimetype not currently mapped: 'application/xml'
   at Octopus.Shared.Util.MimeType.ToExtension(String mimeType) in Y:\work\refs\tags\3.3.10\source\Octopus.Shared\Util\MimeTypes.cs:line 45
   at Octopus.Core.Model.Projects.Project.<get_AttachmentReferences>d__74.MoveNext() in Y:\work\refs\tags\3.3.10\source\Octopus.Core\Model\Projects\Project.cs:line 74
   at Octopus.Migrator.ExportProcess.ExportController.ExportAttachments(IId obj) in Y:\work\refs\tags\3.3.10\source\Octopus.Migrator\ExportProcess\ExportController.cs:line 476
   at Octopus.Migrator.ExportProcess.ExportController.WriteProjects(ExportContext context) in Y:\work\refs\tags\3.3.10\source\Octopus.Migrator\ExportProcess\ExportController.cs:line 316
   at Octopus.Migrator.ExportProcess.ExportController.Export() in Y:\work\refs\tags\3.3.10\source\Octopus.Migrator\ExportProcess\ExportController.cs:line 92
   at Octopus.Shared.Startup.AbstractCommand.Octopus.Shared.Startup.ICommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions) in Y:\work\refs\tags\3.3.10\source\Octopus.Shared\Startup\AbstractCommand.cs:line 57
   at Octopus.Shared.Startup.ConsoleHost.Run(Action`1 start, Action shutdown) in Y:\work\refs\tags\3.3.10\source\Octopus.Shared\Startup\ConsoleHost.cs:line 72
   at Octopus.Shared.Startup.OctopusProgram.Run() in Y:\work\refs\tags\3.3.10\source\Octopus.Shared\Startup\OctopusProgram.cs:line 87
Error: The previous command returned a non-zero exit code of: 100

And another example;

2016-06-23 18:45:54.3677      1 ERROR  ===============================================================================
2016-06-23 18:45:54.3677      1 FATAL  Mimetype not currently mapped: 'image/x-icon'
System.Exception: Mimetype not currently mapped: 'image/x-icon'
   at Octopus.Shared.Util.MimeType.ToExtension(String mimeType) in Y:\work\refs\tags\3.3.10\source\Octopus.Shared\Util\MimeTypes.cs:line 45
   at Octopus.Core.Model.Projects.Project.<get_AttachmentReferences>d__74.MoveNext() in Y:\work\refs\tags\3.3.10\source\Octopus.Core\Model\Projects\Project.cs:line 74
   at Octopus.Migrator.ExportProcess.ExportController.ExportAttachments(IId obj) in Y:\work\refs\tags\3.3.10\source\Octopus.Migrator\ExportProcess\ExportController.cs:line 476
   at Octopus.Migrator.ExportProcess.ExportController.WriteProjects(ExportContext context) in Y:\work\refs\tags\3.3.10\source\Octopus.Migrator\ExportProcess\ExportController.cs:line 316
   at Octopus.Migrator.ExportProcess.ExportController.Export() in Y:\work\refs\tags\3.3.10\source\Octopus.Migrator\ExportProcess\ExportController.cs:line 92
   at Octopus.Shared.Startup.AbstractCommand.Octopus.Shared.Startup.ICommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions) in Y:\work\refs\tags\3.3.10\source\Octopus.Shared\Startup\AbstractCommand.cs:line 57
   at Octopus.Shared.Startup.ConsoleHost.Run(Action`1 start, Action shutdown) in Y:\work\refs\tags\3.3.10\source\Octopus.Shared\Startup\ConsoleHost.cs:line 72
   at Octopus.Shared.Startup.OctopusProgram.Run() in Y:\work\refs\tags\3.3.10\source\Octopus.Shared\Startup\OctopusProgram.cs:line 87
@fenneh
Copy link
Author

fenneh commented Jun 23, 2016

Aware of http://help.octopusdeploy.com/discussions/problems/44107 and #2324 - I guess when uploading there should be some validation on what's actually being uploaded - I have no idea how someone managed to upload an xml image

@vanessalove
Copy link
Contributor

@vanessalove vanessalove added the kind/bug This issue represents a verified problem we are committed to solving label Aug 2, 2016
@Dalmirog-zz
Copy link

.ICO apparently also an issue
Source: http://help.octopusdeploy.com/discussions/problems/47250

@michaelnoonan
Copy link
Contributor

Fixed image/x-iconand image/svg+xml in #3131.

@michaelnoonan michaelnoonan self-assigned this Feb 27, 2017
@michaelnoonan
Copy link
Contributor

We have had several issues recently where a certain MimeType was not understood by the migrator:

When exporting data from an Octopus instance where something has a logo using an "unsupported" MimeType the exporter will fail. Similarly the import was depending on knowing how to convert file extensions back into a MimeType.

We don't need MimeType during export/import

After investigating this all the way through I've discovered we really don't need this conversion at all during export/import: the "owner" of the Logo actually contains our best knowledge of the MimeType because it is calculated when the Logo is first uploaded: https://github.com/OctopusDeploy/OctopusDeploy/blob/master/source/Octopus.Server/Web/Api/Actions/BaseLogoPutResponder.cs#L57

This means we can safely remove all of this brittle code and just let the logo files go back to being a Key and Stream.

@michaelnoonan
Copy link
Contributor

@octoreleasebot octoreleasebot added this to the 3.11.3 milestone Feb 27, 2017
@octoreleasebot
Copy link

Release Note: Data migration (export/import) no longer cares about the MimeType of logos

@lock
Copy link

lock bot commented Nov 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. If you think you've found a related issue, please contact our support team so we can triage your issue, and make sure it's handled appropriately.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug This issue represents a verified problem we are committed to solving
Projects
None yet
Development

No branches or pull requests

6 participants