Skip to content
New issue

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

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

Already on GitHub? # to your account

No job functions found when adding non-primitive app setting #9714

Closed
slabarque opened this issue Dec 1, 2023 · 6 comments
Closed

No job functions found when adding non-primitive app setting #9714

slabarque opened this issue Dec 1, 2023 · 6 comments
Assignees

Comments

@slabarque
Copy link

slabarque commented Dec 1, 2023

Repro steps

Provide the steps required to reproduce the problem:

func init --worker-runtime dotnet-isolated --target-framework "net8.0" --language C#
func new --template "Timer trigger"
func start --port 7001

Function runs successfully
Now add the following appsetting in local.settings.json:

"myobj": { "key":"value"}

local.settings.json now looks like this:

{
    "IsEncrypted": false,
    "Values": {
        "AzureWebJobsStorage": "UseDevelopmentStorage=true",
        "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
	"myobj": { "key":"value"}
    }
}

Now start the function again

func start --port 7001

The output is now:

No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).

I would expect this to run successfully or at least give a more clearer error message.

@slabarque
Copy link
Author

Just found the following in Ms docs

Values must be strings and not JSON objects or arrays. Setting names can't include a double underline (__) and shouldn't include a colon (:). Double underline characters are reserved by the runtime, and the colon is reserved to support dependency injection

@slabarque
Copy link
Author

Opening again, because maybe it's worth to look at the error message. I lost quite some time to figure out it was actually my local.settings.json file causing this message.

@slabarque slabarque reopened this Dec 1, 2023
@bhagyshricompany bhagyshricompany self-assigned this Dec 12, 2023
@bhagyshricompany
Copy link

Thanks for reporting pls share func invocation id,timestamp,region etc.

@slabarque
Copy link
Author

The issue was with the local.settings.json file, so this occurred when testing on my local machine. See repro steps.

@bhagyshricompany
Copy link

@gavin-aguiar pls comment and validate.

@JAdluri
Copy link

JAdluri commented Jan 29, 2025

As there is no recent activity closing the issue .

@JAdluri JAdluri closed this as completed Jan 29, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants