Giter VIP home page Giter VIP logo

Comments (8)

JamesRandall avatar JamesRandall commented on June 5, 2024

First - thanks for the detailed error report, I'm looking at this now. I believe I have a resolution for the path issue and the second issue is connected to some sort of assembly loading problem which is missing type information in the exception. I'll get those resolved now and while I don't think that will fix the second problem hopefully it will give us more insight.

If its still opaque at that point then I can outline how to debug FunctionMonkey (its pretty easy) and we can maybe do a screen share or share source. Whatever works best!

from functionmonkey.

fpyir avatar fpyir commented on June 5, 2024

Fantastic! That would be awesome. Yeah, I am super happy to debug FM, sounds great!

from functionmonkey.

JamesRandall avatar JamesRandall commented on June 5, 2024

A couple of new NuGet packages should be available (FunctionMonkey 0.12.1 and FunctionMonkey.Compiler 0.12.1) - could you give those a go and let me know what you find please?

The FunctionMonkeyCompilerExe property in the target file should now use / on Unix based platforms (I've not been able to try that - I do have a Mac but not with me at the moment, I've only used FunctionMonkey in "debug" mode on it so obviously this is something I need to start looking at more closely now!).

And I've put some belt and braces around the error handler for the assembly load exception. Seems its getting a null type I didn't expect.

I'm just writing up some compile and debug notes as part of the main documentation now - ought to be there anyhow.

from functionmonkey.

fpyir avatar fpyir commented on June 5, 2024

Much appreciated! Getting correct error messages now, here's the output:

  Writing /var/folders/ws/8qmgsd2d5qzgk18kqcr5tgb80000gn/T/tmpYPWEuX.tmp
info : Adding PackageReference for package 'FunctionMonkey' into project '/Users/adamshort/Desktop/Code/collaboro/ice/ICE/ICE.csproj'.
log  : Restoring packages for /Users/adamshort/Desktop/Code/collaboro/ice/ICE/ICE.csproj...
info :   GET https://api.nuget.org/v3-flatcontainer/functionmonkey/index.json
info :   OK https://api.nuget.org/v3-flatcontainer/functionmonkey/index.json 1018ms
error: Unable to find package FunctionMonkey with version (>= 0.12.1)
Adams-MacBook-Pro:ICE adamshort$ dotnet build
Microsoft (R) Build Engine version 15.7.179.6572 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restoring packages for /Users/adamshort/Desktop/Code/collaboro/ice/ICE/ICE.csproj...
  Generating MSBuild file /Users/adamshort/Desktop/Code/collaboro/ice/ICE/obj/ICE.csproj.nuget.g.props.
  Restore completed in 576.64 ms for /Users/adamshort/Desktop/Code/collaboro/ice/ICE/ICE.csproj.
  ICE -> /Users/adamshort/Desktop/Code/collaboro/ice/ICE/bin/Debug/netstandard2.0/bin/ICE.dll
  
  Unhandled Exception: FunctionMonkey.TypeLoadingException: ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
  Unable to load types:
      ICE.Configuration
      ICE.Services.AzureBusBroker
      ICE.Services.AzureComputerVision
      ICE.Services.IAzureComputerVision
      ICE.Services.ILogging
      ICE.Services.IServiceBroker
      ICE.Services.IStorage
      ICE.Services.Log
      ICE.Services.Storage
      ICE.Models.Asset
      ICE.Models.CognitiveServices.AdultContent
      ICE.Models.CognitiveServices.Analysis
      ICE.Models.CognitiveServices.FaceDetails
      ICE.Models.CognitiveServices.ImageCaption
      ICE.Models.CognitiveServices.ImageCategory
      ICE.Models.CognitiveServices.ImageColoring
      ICE.Models.CognitiveServices.ImageDescription
      ICE.Models.CognitiveServices.ImageTag
      ICE.Models.CognitiveServices.Ocr
      ICE.Models.CognitiveServices.Feature
      ICE.Handlers.BasicTaggingImagesHandler
      ICE.Handlers.FaceRecognitionImagesHandler
      ICE.Handlers.MetadataHandler
      ICE.Handlers.OcrImagesHandler
      ICE.Handlers.ProcessingRequestHandler
      ICE.Commands.BasicTaggingImagesCommand
      ICE.Commands.FaceRecognitionImagesCommand
      ICE.Commands.OcrImagesCommand
      ICE.Commands.ProcessingRequestCommand
      <PrivateImplementationDetails>
      ICE.Configuration+<>c
      ICE.Services.AzureBusBroker+<SendToService>d__3
      ICE.Services.AzureComputerVision+<>c
      ICE.Services.AzureComputerVision+<OcrFor>d__11
      ICE.Services.AzureComputerVision+<CategoriesFor>d__12
      ICE.Services.AzureComputerVision+<CheckForAdultContent>d__13
      ICE.Services.AzureComputerVision+<TagsFor>d__14
      ICE.Services.AzureComputerVision+<DescriptionsFor>d__15
      ICE.Services.AzureComputerVision+<FacesIn>d__16
      ICE.Services.AzureComputerVision+<ColoringFor>d__17
      ICE.Services.AzureComputerVision+<>c__DisplayClass18_0
      ICE.Services.AzureComputerVision+<AnalyseImages>d__18
      ICE.Services.AzureComputerVision+<>c__DisplayClass19_0
      ICE.Services.AzureComputerVision+<>c__DisplayClass19_1
      ICE.Services.AzureComputerVision+<RequestAnalysis>d__19
      ICE.Services.AzureComputerVision+<>c__DisplayClass21_0
      ICE.Services.Log+<>c__DisplayClass10_0
      ICE.Services.Log+<>c
      ICE.Models.Asset+AssetType
      ICE.Models.Asset+User
      ICE.Models.Asset+AssetThumbnail
      ICE.Models.CognitiveServices.FaceDetails+FaceBox
      ICE.Models.CognitiveServices.Ocr+Region
      ICE.Models.CognitiveServices.Ocr+Line
      ICE.Models.CognitiveServices.Ocr+Word
      ICE.Models.CognitiveServices.Ocr+<>c
      ICE.Handlers.BasicTaggingImagesHandler+<ExecuteAsync>d__0
      ICE.Handlers.FaceRecognitionImagesHandler+<ExecuteAsync>d__0
      ICE.Handlers.OcrImagesHandler+<ExecuteAsync>d__0
      ICE.Handlers.ProcessingRequestHandler+<>c__DisplayClass4_0
      ICE.Handlers.ProcessingRequestHandler+<ExecuteAsync>d__4
      <PrivateImplementationDetails>+__StaticArrayInitTypeSize=12
      ICE.Models.CognitiveServices.Ocr+Line+<>c
      null type in ReflectionTypeLoadException
      null type in ReflectionTypeLoadException
      null type in ReflectionTypeLoadException
      null type in ReflectionTypeLoadException
      null type in ReflectionTypeLoadException
      null type in ReflectionTypeLoadException
      null type in ReflectionTypeLoadException
      null type in ReflectionTypeLoadException
      null type in ReflectionTypeLoadException
      null type in ReflectionTypeLoadException
  With errors:
      FileNotFoundException: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=9.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
  
      FileNotFoundException: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=9.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
  
      FileNotFoundException: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=9.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
  
      FileNotFoundException: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=9.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
  
      FileNotFoundException: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=9.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
  
      FileNotFoundException: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=9.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
  
      FileNotFoundException: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=9.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
  
      FileNotFoundException: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=9.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
  
      FileNotFoundException: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=9.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
  
      FileNotFoundException: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=9.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
  
  
     at FunctionMonkey.ConfigurationLocator.FindConfiguration(Assembly assembly) in D:\wip\myOpenSource\functionMonkey\Source\FunctionMonkey\ConfigurationLocator.cs:line 115
     at FunctionMonkey.Compiler.Implementation.FunctionCompiler.Compile() in D:\wip\myOpenSource\functionMonkey\Source\FunctionMonkey.Compiler\Implementation\FunctionCompiler.cs:line 56
     at FunctionMonkey.Compiler.Program.Main(String[] args) in D:\wip\myOpenSource\functionMonkey\Source\FunctionMonkey.Compiler\Program.cs:line 45
  /var/folders/ws/8qmgsd2d5qzgk18kqcr5tgb80000gn/T/tmp4a7068bddb4d400db7fc7ca71ea9ca51.exec.cmd: line 2: 48788 Abort trap: 6           dotnet "/Users/adamshort/.nuget/packages/functionmonkey.compiler/0.12.1-beta000/build/netstandard1.0/../../tools/netcoreapp2.0/FunctionMonkey.Compiler.dll" "/Users/adamshort/Desktop/Code/collaboro/ice/ICE/bin/Debug/netstandard2.0/bin/ICE.dll"
/Users/adamshort/.nuget/packages/functionmonkey.compiler/0.12.1-beta000/build/netstandard1.0/FunctionMonkey.Compiler.targets(11,5): error MSB3073: The command "dotnet "/Users/adamshort/.nuget/packages/functionmonkey.compiler/0.12.1-beta000/build/netstandard1.0/../../tools/netcoreapp2.0/FunctionMonkey.Compiler.dll" "/Users/adamshort/Desktop/Code/collaboro/ice/ICE/bin/Debug/netstandard2.0/bin/ICE.dll"" exited with code 134. [/Users/adamshort/Desktop/Code/collaboro/ice/ICE/ICE.csproj]

Build FAILED.

If you show me how to run FunctionMonkey in debug, I reckon I could have a solid crack at fixing this.

from functionmonkey.

fpyir avatar fpyir commented on June 5, 2024

Also, I can confirm that Microsoft.WindowsAzure.Storage.dll is in fact in netstandard2.0/bin.

from functionmonkey.

JamesRandall avatar JamesRandall commented on June 5, 2024

Thanks!

The issue is to do with the version of the Microsoft.WindowsAzure.Storage assembly - because Azure Functions runs your code in process and how the extensions worked you had to match the specific versions of assemblies that the runtime was using. Severely limiting.

Fortunately they've been working on improving this but the Storage assembly is the last one to be addressed. There's some more info here:

Azure/Azure-Functions#821

They are literally about to roll out updates to resolve this:

Azure/app-service-announcements#129
Azure/app-service-announcements-discussions#64

In the meantime you basically need to make sure you reference (and your dependencies reference or are compatible with) 8.6.0.

As soon as the new NuGet package is released (tonight I believe) I'll update the Function Monkey assemblies to match.

If you're interested in debugging Function Monkey / working on it / exploring it I've published some guidance over here:

https://functionmonkey.azurefromthetrenches.com/guides/contributing/debugging.html

Hopefully useful!

from functionmonkey.

fpyir avatar fpyir commented on June 5, 2024

Oh wow, that is some seriously convenient timing! Thank you for all your help!

Thanks for the guidance doc too, super interested in working on the framework. Cheers!

from functionmonkey.

JamesRandall avatar JamesRandall commented on June 5, 2024

Thanks for your help in getting to the bottom of it and feedback, much appreciated!

I'll close this now but do let me know if you have any further issues.

from functionmonkey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.