adobe-photoshop/generator-assets

Asset generation stops functioning after a different output directory is specified in "Export As..."

lewishowles opened this issue · 16 comments

Update by @joelrbrandt : It seems that this bug is arising when the output directory has been changed in "Export as...". However, we're not 100% clear on that. The original bug is below, along with a long discussion that suggests how we arrived at this "conclusion"


Since the Photoshop CC 2015 update, the Generator (File -> Generate -> Image Assets) is entirely non-functional. I have just this moment tried uninstalling Photoshop entirely (including trashing preferences) and reinstalling to no avail.

Pressing Image Assets displays a check mark, but doesn't output anything. Turning it off and on doesn't have any effect either (which you sometimes had to do in the past).

This is the case for all file types that I've tried so far - jpg, svg, png, png8 - and in every Photoshop document I've tried - so it doesn't seem limited to one misbehaving file.

For now, I'm having to use the Export As feature - but what's worse is that this doesn't take into account the layer name when setting the export settings (I'm sure it used to), for example a layer named logo.svg takes the default settings, and doesn't choose SVG as the filetype - guild.png8 also chooses the default settings (generally PNG), and doesn't set PNG8 as the format.

I've heard from one friend who is having the same issue, but I don't know if it's a widespread thing.

@lewishowles thanks for the bug report. What operating system are you on?

Hi Joel, OSX Mavericks. I'll do a quick test at home too once I get there (same OS but who knows).

@lewishowles I realize this is no consolation, but the feature does work for me on OS X Yosemite. We're investigating further.

One thing that would be helpful would be to have access to your Generator logs. They should be present in this directory on the mac: /Users/[your username]/Library/Logs/Adobe/Adobe Photoshop CC 2015/Generator

If you have a moment, could you please zip up that directory and mail it to joelrbrandt@gmail.com (My @adobe.com email sometimes blocks zip files.) Or, if that directory doesn't exist, well, that'll be helpful info too.

(If others are joining this thread, log locations on mac and win are documented here: https://github.com/adobe-photoshop/generator-core/wiki/Generator-Log-Locations )

Apologies, I did mean Yosemite on the office machine. I've just tried at home (also Yosemite), and it works here, so that's strange. I've sent the logs from the office machine as requested.

It is logging, and the latest file shows the file I was working on most recently (obviously). I do still have the preferences file set up that enabled SVG (which I assume is no longer necessary) but I don't know if that would cause any issues.

@lewishowles Thanks for the logs! It's unlikely that enabling SVG is the culprit, since it's enabled by default using the same code path that your settings file would trigger. But, you could try removing the settings file just to be sure.

Looking through the logs, it definitely looks like there's something strange in the document info that Photoshop is sending Generator for one of your documents. Specifically, I'm seeing errors like this:

[error:generator-assets 15:32:43.829 document.js:845:34] Error updating property layers [ { id: 142, changed: true },
  { id: 143, changed: true },
  { id: 144, changed: true } ] [Error: Unknown change]
[warning:generator-assets 15:32:43.830 documentmanager.js:272:26] Unable to apply change to document

Might you be willing to privately share the PSD that is causing problems? I'll send you an email about this. We'll keep the PSD completely confidential inside Adobe.

Thanks for being so responsive in helping us track this down!

Hi Joel,

I have sent across the PSD. I was trying to think if there was anything strange about the document, but not to my knowledge. It does use an Artboard, but I have just tried that with a new, blank document on my home machine and the generator still worked as expected.

What's even more odd is that I have just tried the PSD on my home machine (which is all but identical, except hardware - same OS version, same Photoshop, broadly the same software) and it worked.

@lewishowles Do you have the Generator Config extension installed? Generator stopped working for me all together when I installed it. Removing it and the generator.js got things working again.

@JimCollinson Unfortunately not - but that looks like an interesting extension that I missed!

@joelrbrandt Well, now I'm confused.

I removed the generator.json preferences file from my home directory, and restarted Photoshop. It didn't appear to do anything, so I carried on with my day. I have just come back to it some time later (within the last 15 minutes or so) and have been exporting some other assets from the same PSD using the 'export as' as a temporary measure. This usually sets the Desktop as the directory in which it wants to export, but I noticed this time it had chosen a different directory (the assets one usually created by the generator) and that the folder already had some items in it.

I deleted the folder and modified one of the named layers (with the generator active) and it re-created the folder and output the file as expected.

I hate it when things like that happen, because it both doesn't provide much useful information for tracking down a bug, and makes me look like an idiot!

The only thing that I can remember changing was removing the generator.json file, so I'll have to chalk it up to that, but I can provide the logs folder again.

@lewishowles curious! I had noticed in your failing logs that you had a different output directory specified. My gut says that there's a bug in our code around handling different output directories that are set up via "Export as..." and then attempted to be used through image asset generation.

For now, I'm going to change this bug to reflect that (because I'm not sure what else to do). But, if you happen to get more information, please reply to this bug. I'll also (internally) keep all of the logs and test document you sent. Thanks for working so hard to investigate this.

I have the same issues as "lewishowles". My generator logs can be found here: http://cl.ly/1h303b0M3X0f

I really hope a solution can be found. Having the ability to set output interpolation is a must have feature.

Thanks

Could be the custom directory. I remember installing and tinkering with this plugin in an effort to direct project files directly to my web images folder. I hadn't used it since, so deleting my generator.js from my home folder and restarting Photoshop solved my issue.

Had the same issue. Deleted generator.json and restarted Photoshop - and it started working...

As per the discussion in adobe-photoshop/generator-panels#18 this will be fixed in the next release of PS (whatever is after 16.0.1). Closing this issue.

The workaround for 16.0.1 is to not use a config file generated using the generator-panels configuration panel.

I WAS having this same issue. The contents of Plug-ins\Generator in both my 2014 and 2015 installs of Photoshop are empty. However I asked a co-worker who's "Generate Image Assets" command IS working to check his install. and HIS folder is empty too.

To get it working again I went into PS prefs, Looked at "Plug-ins" -- Enable Generator was checked, I toggled it on and off, I checked the box that says "Show Filter Gallery groups and names" (I also changed my scratch disk from using the Internal drive to using an external). I saved the prefs and suddenly the app was once again correctly generating PNGs and JPGs. Makes no sense, but it worked.