Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

The metadata object CodeUnit 50139 was not found.

Posted on by 65

Hi,
I have got this unexpcted error in the job queue "The metadata object CodeUnit 50139 was not found.". I created a job queue which runs the code unit to import products using external api call. I uploaded .app extension file and installed it on the sandbox environment and configure job queue which successfully started at the specific time.

The job queue runs almost 42000 iteration and imported around 9000 products. The job time out was 18 hours but it ran almost 9 hours which i checked last time the job queue was in InProcess state it was not stopped.

When i checked in the morning the job queue was stopped due to this error. The metadata object CodeUnit 50139 was not found.

pastedimage1674210254153v1.png

I got this error 2 times yesterday, The first time the same error occurred when i ran job queue By clicking the Run Once Fore Ground Option and as i closed the tab i got this error.

The 2nd time i got this error when i run the project in the debugging mode and set job queue to run on the specific time and when i stopped debugging i got this error again for that job.

To avoid this i created .app file and uploaded and set it's time to start it automatically on a specific time but after almost 9 hours i got this error again in the sandbox environment in this time i didn't do anything.

What could be the possible reason of this and how I can solve this issue i am struggling to know the actual reason of this?

Is there any way from where i can see actual cause of error and system generated exceptions?

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,339 Super User 2024 Season 2 on at
    RE: The metadata object CodeUnit 50139 was not found.

    Hi, Weird problem, this looks like your objects are not compiled correctly. But you mentioned Sandbox, so this should be the SaaS version.

       

    How did you upload the app files? If you publish directly from VS Code, it may be automatically uninstalled during Minor Update.

    Hope this helps.

    Thanks.

    ZHU

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: The metadata object CodeUnit 50139 was not found.

    I can not help you with that specific error. But one design tips would be to try to avoid creating jobs that runs processing for that many hours in one transaction scope.

    You should try to reduce the workload that is handled for each iteration of the job queue job.

  • Suggested answer
    Marco Mels Profile Picture
    Marco Mels on at
    RE: The metadata object CodeUnit 50139 was not found.

    Hello,

    Difficult to say form here, but there may be more information in application event log file related to The metadata object CodeUnit 50139 was not found.

    Thank you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,228 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans