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

ModelsBuilder on Umbraco v8.8 #245

Open
IainMartin-Ayr opened this issue Oct 19, 2020 · 10 comments
Open

ModelsBuilder on Umbraco v8.8 #245

IainMartin-Ayr opened this issue Oct 19, 2020 · 10 comments

Comments

@IainMartin-Ayr
Copy link

I'm using ModelsBuilder in API mode with the ModelsMode set to Nothing. Build my models in VS using the Custom Tool option.

I upgraded the site to Umbraco V8.8.0 and ModelsBuilder throws the 401 Unauthorized error and doesn't build any models. Took the site back to v8.7.0 and it's fine.

Looks like there's something changed in V8.8.0 that's preventing MB from authorizing in the back end - the Tools -> Options -> Umbraco config file was not touched or changed at all during this time, apart to check that the details were correct.

Regards
Iain Martin

@LachlannRattray
Copy link

Hey just to chip in on this one, I am on Umbraco 8.9 and have the same issue. using the new version of the visual studio tool as well.

@LachlannRattray
Copy link

An update from me, it turned out that I had a slightly older version of ModelsBuilder and ModelsBuilder API installed upgrading to 8.1.6 now lets me generate models

@IainMartin-Ayr
Copy link
Author

@LachlannRattray - So are you downloading the source files from Tag 8.1.6 on GitHub and building it yourself?

@LachlannRattray
Copy link

@IainMartin-Ayr im not I realized looking through NuGet that even though i had upgraded to 8.9 from 8.6.3 (i think) Models builder was at version 8.1 after i upgraded to 8.1.6 models were being generated again. I do however have an issue where the models do not seem to be actually implementing the base properties for IPublishedContent. But I think that might be a different issue.

@IainMartin-Ayr
Copy link
Author

@LachlannRattray - okay, now I'm totally confused :-) I'm looking at my Manage Extension dialog in VS and ModelsBuilder Custom tool is showing as version 8.0.5 and it has automatic updates checked. But I did notice on GitHub there's a comment under the latest release that it;s not being automatically updated as it might break things.

It's ages since I last installed MB, tending just to copy the DLL and so on from other projects, set the connection paramters in Tools > Umbraco and change the web config to the correct settings for my MB use.

However, looking at Umbraco 8.9, it seems to be mostly external provider logins is the main update for this, and I'm not too worried about that, so I'll probably stick with 8.7 for now as I know it's working in the way I want and am used to.

Hate VS and NuGet and GitHub and DLL hell sometimes........

@Vertigo093i
Copy link

@IainMartin-Ayr try to switch from the deprecated "custom tool" extension to the new Umbraco ModelsBuilder Extension. It is version 8.1.5 and for our team works fine with 8.8.0.

@giordanop
Copy link

I also had issues on Umbraco.CMS 8.9.0 and Umbraco.ModelsBuilder 8.1.0.

The log in the General tab of VS said:
UmbracoModelsBuilder: Starting v8.1.5 17/11/2020 10:38:57.
UmbracoModelsBuilder: UmbracoModelsBuilder failed to generate code: Exception: Response status code does not indicate success (Unauthorized)

Then I've updated Umbraco.ModelsBuilder to 8.1.6 and everything started working well again.

@OwainJ
Copy link

OwainJ commented Dec 2, 2020

I was getting the same "Unauthorised" issue after upgrading from Umbraco v8.7.0 to Umbraco v8.8.0. But I fixed it by updating Umbraco.ModelsBuilder, Umbraco.ModelsBuilder.API and Umbraco.ModelsBuilder.UI to v8.1.6 (from v8.1.0).

@f33n3y
Copy link

f33n3y commented May 12, 2021

Same issue with recent upgrade to Umbraco 8.6.0 -> 8.9.1
Can confirm upgrade of Umbraco.ModelsBuilder and Umbraco.ModelsBuilder.API packages from 8.1.0 -> 8.1.6 fixed the "Unauthorised" error.
I then encountered an InternalServerError when generating the models which I think was due to us having customised some of the generated models. Moving the location of the .mb file that gets used by the Umbraco Models Builder Extension for Visual Studio resolved the issue.

@hfloyd
Copy link

hfloyd commented May 12, 2021

I'm having these issues today on Umbraco 8.13.0 sites (some running on Umbraco Cloud). The NuGet packages are all 8.1.6, the VS extension is 8.1.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants