Inject config via constructor

As part of a larger refactoring to decouple from global state we want to move to injecting config via constructor arguments instead of referencing it directly via the yamlConfig global variable.
https://github.com/GaloyMoney/galoy/pull/321 is a PR that introduces the pattern.
We can introduce the same pattern incrementally across the whole code base.
cc @vindard

I'm currently tackling this through a series of smaller PRs

[x] SpecterWallet class (PR #344)

[x] UserWallet class (PR #370)

[ ] ILndParams& lnd inputs

Create the lnd mapping config in config.ts instead

[ ] Rate limits

Do explicit RateLimiter configs and a getter functions

[ ] schema.ts

Pull in already created TransactionLimits config
Create a fees config

[ ] text.ts & user.ts

Pass test accounts (here and here) as config

[ ] utils.ts & graphql-server.ts

Create explicit configs for IPs objects (here and here) and constants required

[ ] walletFactory.ts getFunderWallet function

Revisit and potentially pass config as explicit argument to function

[ ] graphql-core-server.ts

Include limits and fees configs that would've been created in prior PRs

[ ] Update tests to use new config value where applicable

02-index.spec.ts
02-send-onchain.spec.ts
graphql.spec.ts

This is a great overview.
Reviewing some other code I was thinking perhaps we should generally re-think how the test_accounts are being configured and user. I don't like the logic around them in the production code and the way they are hard coded and implicitly referenced. Lets make sure to do a sync around that before you get there (or do those last if we don't find time).

Gotcha, moved that test_accounts task down to the bottom of the list


feat: do not check whether optional type parameters of classes can be inferred

Closes #1084
Summary of Changes
Optional type parameters of classes are now always allowed, even if they can never be inferred from their usage in the constructor.
This is useful to initialize them to some default value upon instantiation and override this value later, e.g. in return types of functions. See #1084 for an example.

:tada: This PR is included in version 0.13.0 :tada:
The release is available on:

npm package (@latest dist-tag)
npm package (@latest dist-tag)
v0.13.0
GitHub release

Your semantic-release bot :package::rocket:


Jello animation non-functional on .png portraits

The problem
Describe the bug
All animations in the 'update' character event work for .png portraits except for the one titled 'jello'. The animation is simply skipped.
To Reproduce
Using a character with a .png portrait, create a timeline with the character event with the animation set to 'jello'
Expected behavior
it should animate as with .tscn portraits.
Screenshots

System (please complete the following information):

OS: Kubuntu 20.04
Godot 3.5
Dialogic 1.4.5

If there's a technical limitation preventing this behavior from functioning, there's no indication of that in the plugin.
One workaround is to use a .tscn instead of a .png, but in some situations that can cause haults #1226

Closing since Dialogic 1 is no longer in active development


Not enough storage is available to process this command. (Exception from HRESULT: 0x80070008)

Hello,
I am using Meta Vlc and creating multiple VlcPlayers in succession.
My program displays multiple videos in sequence (each around 100 mb and lasts about 10 seconds)
I get the error in the title after creating around 100 VlcPlayers
I am using
video = new VlcPlayer();
video.Stretch = System.Windows.Media.Stretch.Fill;
video.EndBehavior = EndBehavior.Stop;
parent.Children.Add(video);
video.LoadMedia(media);
video.Loaded += callback;
i have snooped around the code and found that when i call dispose i don't see the handlers for the player being disposed maybe that is the issue maybe not i am not that deep into coding.
Any help would be appreciated :D

in VlcPlayer.cs:
public VlcPlayer()
{
this.AddHandler(ThreadSeparatedControlHost.ThreadSeparatedControlLoadedEvent, new RoutedEventHandler(
(s, a) =>
{
if (ThreadSeparatedImageLoaded != null)
{
ThreadSeparatedImageLoaded(this, new EventArgs());
}
}));
}
i think the routed event is not removed when calling dispose is that correct ?

Also noticed by debugging, first time i debug :D
There are increasing instances of  (maybe not instances but references are not being removed, it kept piling up till it reached around 150 occurrence)
Meta.Vlc.VlcEventManager
Meta.Vlc.Wpf.VisualTargetPresentationSource

I spend the last 2 days debugging this error with no luck.
I am creating new VlcPlayer for each video to be played as a slideshow from the default () constructor.
Each video is a maximum 20 seconds long so there will be alot of videos.
What I have learned so far from debugging is that there is a memory leak caused by the following:
VisualTargetPresentationSource instances are not being removed when video.Dispose() is called same goes for VlcEventManager (but the event manager occurs less).
VisualHost, VisualTarget and ScaleTransform are not also piling up.
There is a VlcPlayer.cs file where EventManager.Detach is not being called on Dispose function.
I tried understanding the workings of the custom dispatcher with no luck but I believe the dispatcher is not properly removing the elements.
In the VlcPlayer constructor AddHandler is being called without RemoveHandler in Dispose() maybe that is also the problem.
I have tried as a workaround to use 2 fixed players in xaml but when I call:
video.Stop();
video.LoadMedia("xxx");
video.Play();
playback freezes for around 5 seconds which is not good since some of the videos appear for only 1 second.

Now it's becoming funny :D
I did a workaround using 4 fixed players and I alternate between them, I managed to avoid the freezing by calling video.VlcMediaPlayer.play();
However, now after playing many videos for around 15 minutes or so the application consumes around 1.5 gb and exists with memory full error.
There is a lot of memory leaks in this library, I wish I can help to solve them


sops-pgp-hook evaluation fails in a strict shell (set -euo pipefail)

While testing things in a local repository, I discovered with direnv that enabling the strict_env option, which executes the hook with set -euo pipefail, would fail to evaluate the hook and exit.
I didn't have the variable below exposed so the script would exit with $VARIABLE_NAME: unbound variable
https://github.com/Mic92/sops-nix/blob/4a8cb2bd5051cdce7767bc0ea817aedb3896462d/pkgs/sops-pgp-hook/sops-pgp-hook.bash#L14
https://github.com/Mic92/sops-nix/blob/4a8cb2bd5051cdce7767bc0ea817aedb3896462d/pkgs/sops-pgp-hook/sops-pgp-hook.bash#L21
Changing the logic to "${VARIABLE_NAME-}" would prevent errors and only assign the empty string if the variable is undefined.

Should it not be "${VARIABLE_NAME:-}" instead? Can you make a pull request?

I'll open a PR tomorrow when time permits


Contract functions that doesn't exist should trigger error

Currently in the tests, if you misstype or call a function that doesn't exists the function is assigned a type of any, meaning that it doesn't display an error until you run the tests.
This happens because all contracts inhjerit from the class Contract which has this line:
export declare class Contract {
   readonly [name: string]: ContractFunction | any;
}

removing that line fixes the issue for me.

Yes, this looks like it shouldn't be there. Which target do you use? I am not sure if we control that code.

I'm using typechain-target-ethers

@quezak didn't you encounter that already?
Currently, we use Contract base type from ethers so we would need to extract and fix it https://github.com/ethereum-ts/TypeChain/blob/master/packages/typechain-target-ethers/lib/generation.ts#L40

Yeah, that's because our contract classes are just more specific type declarations for the ethers normal Contract class -- at runtime all contracts are a Contract instance anyway.
I'll have to take a closer look if we can update our typings to reject other functions without changing the approach -- but we might have to add a concrete class, not just a declaration.

This works now 🥳


Add BackendJwt config support from config deployer

Purpose
$subject
Related PRs
https://github.com/wso2/apk/pull/1244

Codecov Report
Patch coverage has no change and project coverage change: -9.68 :warning:

Comparison is base (9e7cb97) 25.15% compared to head (454e2b5) 15.47%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1356      +/-   ##
==========================================
- Coverage   25.15%   15.47%   -9.68%
==========================================
  Files         230       22     -208
  Lines       30276     1906   -28370
  Branches     5994     1159    -4835
==========================================
- Hits         7616      295    -7321
+ Misses      22396     1611   -20785
+ Partials      264        0     -264

Flag
Coverage Δ

adapter
?

config-deployer-service
15.47% <ø> (+0.28%)
:arrow_up:

idp-domain-service
?

runtime-domain-service
?

Flags with carried forward coverage won't be shown. Click here to find out more.
see 213 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Add annotations from seedConfig to Seed object

How to categorize this PR?

/area usability
/kind enhancement
What this PR does / why we need it:
Add annotations from seedConfig to Seed object on registration and document the behavior of seedConfig.metadata.{labels,annotations}.
Which issue(s) this PR fixes:
Special notes for your reviewer:
Release note:

Annotations in `GardenletConfiguration.seedConfig.metadata.annotations` are added to the `Seed` object during registration. If an annotation is removed from `seedConfig`, it is **not** removed from the `Seed` object.

/approve


Increase MaxCommandBufferCount in ops_metal to 1024

This should fix the Metal blocking issue. From doc
"Each command queue has a fixed number of command buffers for its lifetime (see makeCommandQueue(maxCommandBufferCount:)). This method blocks the calling CPU thread when the queue doesn’t have any free command buffers, and returns after the GPU finishes executing one."
The default newCommandQueue set the number to 64 (doc). This PR increases it to 1024. I could not find a guidance on the limit of this number. A stackoverflow comment claimed RealityKit is using 1024. 1024 works on my M1 Max and it's enough for stable diffusion and llama.
JIT=1 python -O examples/llama.py --prompt "Hello." --count 10 --temperature=0 --timing
using METAL backend
using LLaMA-7B model
ram used: 13.48 GB, freqs_cis                                         : 100%|█| 292/292 [00:01<00:00, 153.
loaded weights in 1915.31 ms, 13.48 GB loaded at 7.04 GB/s
Hello.
ran model in 5807.81 ms
sync in 187.28 ms
 I
ran model in 217.31 ms
sync in 7.55 ms
'
ran model in 145.67 ms
sync in 4.16 ms
m
ran model in 26.82 ms
sync in 61.14 ms
 a
ran model in 21.98 ms
sync in 64.84 ms

ran model in 20.41 ms
sync in 66.90 ms
2
ran model in 19.68 ms
sync in 68.31 ms
0
ran model in 19.92 ms
sync in 68.15 ms
 year
ran model in 20.21 ms
sync in 68.86 ms
 old
ran model in 19.64 ms
sync in 69.37 ms
 male

Changes made in tinygrad/:
------------------------------------------------------------
files                             insertions       deletions
------------------------------------------------------------
tinygrad/runtime/ops_metal.py              1               1
------------------------------------------------------------
lines added in the tinygrad folder: 0

Nice find!


new(tests): EIP-7702 - Set EOA account code for one transaction

🗒 Description

🔗 Related Issues

✅ Checklist

[ ] All: Set appropriate labels for the changes.
[ ] All: Considered squashing commits to improve commit history.
[ ] All: Added an entry to CHANGELOG.md.
[ ] All: Considered updating the online docs in the ./docs/ directory.
[ ] Tests: All converted JSON/YML tests from ethereum/tests have been added to converted-ethereum-tests.txt.
[ ] Tests: Included the type and version of evm t8n tool used to locally execute test cases:  e.g., ref with commit hash or geth 1.13.1-stable-3f40e65.
[ ] Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

Created an issue to update the tests for devnet-2:
https://github.com/ethereum/execution-spec-tests/issues/703
We can merge as is now.


Support partial evaluation of Path info

Currently we have to get all the attributes of a Path at once using the info() method. It would be good to be able to query the keys independently of getting the values, and then retrieve the values one by one.

Closing - this was implemented in #1190.


Add exec component extension

fixes #417

ok to test

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/camel-quarkus-pr/404/


bug/some unwanted resources added in frontend roadmap

Description
In frontend roadmap,in framework section it redirect to some meta/apple careers portal instead of resources.Attaching pic with tick mark on it having that problem
Screenshots

Additional information
No response

Hello @rahul09999 even I noticed this bug and would like to work on it if no-one has started yet

Thank you so much for the report @rahul09999 and thank you for showing interest @KlausMikhaelson but this issue will be worked on by the team

Thank you for the report @rahul09999. This issue has been resolved


Flutter Test

First at all very good job, it is a nice plugin. This is not really an issue but I am trying to test a logic service, and this calls to "Get.offNamed", but I could not find a way to mock it or get around it in order to pass my test. Sorry if this is not the best way to ask about this and thank you.

You can use the mock test of the Flutter Navigator to test the Get functions. Just replace the corresponding function with that of Get.
https://github.com/flutter/flutter/blob/master/packages/flutter/test/widgets/navigator_test.dart
A more simplistic approach is to use GetObserver, insert the Routing variable as a global variable, push the route, and receive something by argument (Flutter even uses this approach, they use TestObserver as a kind of GetObserver, and observe the parameter sent by route).
I am creating an easy API to access arguments outside of classes, and this can make your testing easier, as you can test whether the current argument is the one sent, and whether the current route is the first in the stack. This API is undergoing internal testing, and will be made available to the dev branch soon.
Note:
In your test, insert Get.key in your MaterialApp, GetObserver also needs to be there for the second approach, and you need to create a mock with at least 3 routes to test Get.offNamed (if you intend to test whether the last route became the first in the pile and all others have been discarded)
Depending on the level of your tests, you may want to create your own Observer, within it you can expose route.isFirst (passing a Function (bool isFirst) in the constructor, for example) to check if all other routes have left the stack.
I'm sorry for not providing individual tests for each role, I would love to do that, but as I am the sole maintainer of this library, I have focused my time on stability and adding new features. A lot of things required rebuilding from scratch (like snackbars, dialogs, bottomsheets and GetRoute), and I didn't have time to build basic things like testing and documenting all APIs. But if you need help, don't hesitate to comment.

try add
TestWidgetsFlutterBinding.ensureInitialized();
Get.testMode = true;


opencv_ffmpeg problem while compile cmake

Hi,
I've downloaded the latest for both (opencv 3.1 and opencv_contrib) and when I try to compile it in cmake (new version of opencv) it says "Failed to download opencv_ffmpeg.dll. Status=7;"Couldn't connect to server" is there any ideas? thx

Please, take a look at https://github.com/Itseez/opencv/issues/5546


trailing-commas forces whitespace to spaces

We use tabs in our codebase, and running the trailing-commas codemod cause this block:
api.get({
	api_version: 1,
	path: "/settings/hiddenusers",
	query : {
		limit: 10,
		before: res.body.paging.cursors.before,
	}
})
.then(() => {
	done();
})
.catch(genericApiError(done));

to become
api.get({
    api_version: 1,
    path: "/settings/hiddenusers",

    query: {
        limit: 10,
        before: res.body.paging.cursors.before,
    },
})
.then(() => {
	done();
})
.catch(genericApiError(done));

Would be nice if it respected the whitespace already there!

Not sure how I missed this before posting, but the added newlines are also something I don't think should be happening!

I think this should be reported in recast: https://github.com/benjamn/recast


Is T-SimHat compatible with T-A7608?

Is T-SimHat (CAN+RS485) compatible with T-A7608 or just T-A7670 and T-SIM7000G? Documentation does not explain it

T-SimHat was designed to be compatible with SIM7000G, not A76XX. I checked the schematic and found that the interrupt of T-SimHat's accelerometer conflicts with the solar ADC detection pin of A7670 series.

So there is no option to use T-SimHat with A-7608E-H S3? How about combatibility with T-SIM7670G S3?

Conflicts with SIM7670G, cannot be used
T-A7608-ESP32 version conflicts with solar ADC
T-A7608-ESP32S3 version can be used
T-A7670X-ESP32 version can be used
I personally recommend using A7670x, it requires less current.
Although A7608X is CAT-4, it is limited by the serial communication rate and has no advantages. It consumes more power and has higher power requirements

Last question (so far) about compatibility. I dont have must need for the battery
is this T-SimHat & T-PCIE with A7608E-H suitable combination?

PCIE?
It's not compatible.


⚠ Secret Website 2 has degraded performance

In 8d12c57, Secret Website 2 ($SECRET_WEBSITE_2) experienced degraded performance:

HTTP code: 200
Response time: 6660 ms

Resolved: Secret Website 2 performance has improved in 9d1ccd9.


Fix for #689: raise an exception when there is no decoder available

Fix crash.

Could you please add a test capturing this situation?

This is done with a RuntimeError in e9d87b01ee412ca50180416c5cdf3fb996964a4c


For ASQA, how to reproduce the baseline?

Hi! Thanks for your great work.
I try to reproduce the baseline for ASQA using Llama-2-7b-hf, like this:
python run_baseline_lm.py
--model_name meta-llama/Llama-2-7b-hf
--input_file eval_data/asqa_eval_gtr_top100.json
--max_new_tokens 300 --metric match
--result_fp output/test_out_ASQA_Llama-2-7b-hf_300_Retrieval-augmented  --task qa --mode retrieval --prompt_name "prompt_no_input_retrieval"    --world_size 8
However, the error was returned :
Traceback (most recent call last):
File "run_baseline_lm.py", line 230, in
main()
File "run_baseline_lm.py", line 128, in main
retrieval_result = item["ctxs"][:args.top_n]
KeyError: 'ctxs'
Could you please help to fix it?

I also met this issue when using my own retrieval data. The key 'ctxs' possibly refer to "contexts". The data items in asqa_eval_gtr_top100.json don't always have the key 'ctxs'. To fix this issue, maybe you have modify this code block to fit ASQA dataset.


Kanban Board Setup

In this milestone we:

Copied the Kanban board on the Github Project here
There are 3 people in this team @ehmaddd : Team member 1 & @stephenkati: Team member  2 @MarwanDev : Team member  3

Project Status: APPROVED :green_circle:
Hi @MarwanDev , @stephenkati  and @ehmaddd ,
Your project is complete!  There is nothing else to say other than... it's time to merge it :shipit:
Congratulations! 🎉

Highlights :fire:

Kanban board setup as expected :heavy_check_mark:
Tasks distributed fairly amongst team members :heavy_check_mark:
All cards are assigned :heavy_check_mark:
Group tasks included on the kanban :heavy_check_mark:
Each card has a descriptive title, the number of points in the [Xpt] prefix, and a description of the task. :heavy_check_mark:

Optional suggestions
Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.
Cheers, and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.

As described in the Code reviews limits policy  you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.


pokemon-go-mitm-node Configure Error

Your environment has been set up for using Node.js 4.4.7 (x64) and npm.
C:\Users\Matt>cd clone
The system cannot find the path specified.
C:\Users\Matt>cd desktop
C:\Users\Matt\Desktop>cd clone
C:\Users\Matt\Desktop\Clone>git clone https://github.com/rastapasta/pokemon-go-mitm-node.git && cd pokemon-go-mitm-node
Cloning into 'pokemon-go-mitm-node'...
remote: Counting objects: 643, done.
remote: Compressing objects: 100% (70/70), done.
emote: Total 643 (delta 36), reused 0 (delta 0), pack-reused 573
Receiving objects: 100% (643/643), 141.18 KiB | 0 bytes/s, done.
Resolving deltas: 100% (343/343), done.
Checking connectivity... done.
C:\Users\Matt\Desktop\Clone\pokemon-go-mitm-node>npm install
|

<EMAIL_ADDRESS>install C:\Users\Matt\Desktop\Clone\pokemon-go-mitm-node\node_modules\pokemongo-protobuf\node_modules\node-protobuf
node-gyp rebuild

C:\Users\Matt\Desktop\Clone\pokemon-go-mitm-node\node_modules\pokemongo-protobuf\node_modules\node-protobuf>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:401:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:356:11
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Matt\Desktop\Clone\pokemon-go-mitm-node\node_modules\pokemongo-protobuf\node_modules\node-protobuf
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the node-protobuf package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-protobuf
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls node-protobuf
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Matt\Desktop\Clone\pokemon-go-mitm-node\npm-debug.log
C:\Users\Matt\Desktop\Clone\pokemon-go-mitm-node>
this is what i get when i clone the file in the Node.js CMD, it clones it fine (assuming it does.) with no problems, and when i do "C:\Users\Matt\Desktop\Clone\pokemon-go-mitm-node>npm install" i get the following output above. am i missing something? thank you for any help!

Make sure you get protobuf... I had the same issues (granted I used a machine running linux so it was much easier) but mine was an old version of node.js.. then once I updated I had the error you're getting..
you need to hard compile protobuf for a Windows enviroment .. or run a VM with a Linux Distro

There are countless issues about this please at least try to search before making a new issue.


[VirtIO] Redefine ENOSPC to common Linux errno

The VirtIO\osdep.h header file defines ENOSPC as 1. On Windows this equates to ERROR_INVALID_FUNCTION.
This commit redefines ENOSPC to use the more typical Linux definition of 28.

It's worth mentioning that AFAICT the only place in the tree that uses this definition of ENOSPC are the virtqueue_add_buf() routines in VirtIO\VirtIORing.c and VirtIO\VirtIORing-Packed.c.

It's worth mentioning that AFAICT the only place in the tree that uses this definition of ENOSPC are the virtqueue_add_buf() routines in VirtIO\VirtIORing.c and VirtIO\VirtIORing-Packed.c.

Yes, that's how it looks like.


Missing license file

The documentation says that the plugin is free to use and extend, but I haven't found a detailed description of the rights granted to the users. For example, are users allowed to redistribute their extended version of the program? And could somebody include this program as part of a software released under a proprietary license?
With github, you can easily choose a license from the popular options and add the corresponding file to the repository. EDIT: I see that your other repositories contain licenses, so you probably already knew about this ;)

Yes, something happened when I created this one, I'm sorry. I usually take BSD or MIT licenses, so feel free to use it as you will.. I'll update this as soon as possible, adding a BSD license to it..

Turns out there was a fast way for doing it. Done!
Cheers,
Henry John Kupty

Great, thanks! :)


[QUESTION] Recommended way to use FastAPI with Firebase (Pyrebase4  or firebase_admin)

I want to know how to setup the comunication between FastAPI and the Firebase data storage (Firestore) through Pyrebase4. I didn't find any info or example  of this case.

Pyrebase is pretty straight forward to use/understand than firebase-admin in implementation.
I tried both of them.
Pyrebase has realtime streaming/listening function.
In older versions of Firebase_admin there is no realtime listener for python SDK. It is implemented in the latest versions.
Currently  in feature-wise, there is no much difference between both libraries.

Pyrebase is pretty straight forward to use/understand than firebase-admin in implementation.
I tried both of them.
Pyrebase has realtime streaming/listening function.
In older versions of Firebase_admin there is no realtime listener for python SDK. It is implemented in the latest versions.
Currently  in feature-wise, there is no much difference between both libraries.

Do you have some example of basic setup of FastAPI with Pyrebase4? I mean, some simple CRUD using it.

Do you have some example of basic setup of FastAPI with Pyrebase4? I mean, some simple CRUD using it.

You can check this sample..
import pyrebase

fireBaseConfig = {

    'apiKey': "******************************",
    'authDomain': "********************************.firebaseapp.com",
    'databaseURL': "https://**************.firebaseio.com",
    'projectId': "**************",
    'storageBucket': "**************.appspot.com",
    'messagingSenderId': "*****************",
    'appId': "**************************",
    'measurementId': "**************"
        }

we will have to get those firebaseConfig details by registering in firebase.
firebase = pyrebase.initialize_app(fireBaseConfig)
auth = firebase.auth()
db = firebase.database()

you can save above db config details in seperate file and can import them.
import json
from fastapi import FastAPI

app=FastAPI()

@app.get("/")
async def get_data():
	"""to get data from a given table"""
	some_data = db.child('any_table_name').get()
	print(some_data)
	return some_data

@app.get("/users")
async def get_users():
	"""to get users details"""
	return db.child('users').get()

@app.get("/info")
async def get_info():
	"""to get every detail in the database."""
	return db.child().get()

for reference
https://github.com/nhorvath/Pyrebase4

You can check this sample..
import pyrebase

fireBaseConfig = {

    'apiKey': "******************************",
    'authDomain': "********************************.firebaseapp.com",
    'databaseURL': "https://**************.firebaseio.com",
    'projectId': "**************",
    'storageBucket': "**************.appspot.com",
    'messagingSenderId': "*****************",
    'appId': "**************************",
    'measurementId': "**************"
        }

we will have to get those firebaseConfig details by registering in firebase.
firebase = pyrebase.initialize_app(fireBaseConfig)
auth = firebase.auth()
db = firebase.database()

you can save above db config details in seperate file and can import them.
import json
from fastapi import FastAPI

app=FastAPI()

@app.get("/")
async def get_data():
	"""to get data from a given table"""
	some_data = db.child('any_table_name').get()
	print(some_data)
	return some_data

@app.get("/users")
async def get_users():
	"""to get users details"""
	return db.child('users').get()

@app.get("/info")
async def get_info():
	"""to get every detail in the database."""
	return db.child().get()

for reference
https://github.com/nhorvath/Pyrebase4

I did the following, but for a reason that I didn't find yet, I can't reach the firebase data.

I got http 200 but without  the Firebase data. Any tip about that?

I did the following, but for a reason that I didn't find yet, I can't reach the firebase data.

I got http 200 but without  the Firebase data. Any tip about that?

have you created api_key etc., in firebase config details and used in api?

have you created api_key etc., in firebase config details and used in api?

My project structure:
my_api
|_app
|_config
|     |_database.py
|_routes
|      |_category.py
|_schemas
|        |_category.py
|_main.py
My app/config/database.py:

My app/schemas/category.py:

My app/routes/category.py:

My app/main.py:

Am I missing something?

My project structure:
my_api
|_app
|_config
|     |_database.py
|_routes
|      |_category.py
|_schemas
|        |_category.py
|_main.py
My app/config/database.py:

My app/schemas/category.py:

My app/routes/category.py:

My app/main.py:

Am I missing something?

Just for confirmation, I have one sigle data saved for test.

Just for confirmation, I have one sigle data saved for test.

Can you check in realtime database?
Currently pyrebase doesn't have support to cloud firestore. It has support for realtime database.
Whatever you do transactions with pyrebase, they will be stored and fetched from realtime database.
If you need to work on firestore,use firebase_admin sdk.
follow this link for reference...
https://github.com/thisbejim/Pyrebase/issues/268#issuecomment-545557451

Can you check in realtime database?
Currently pyrebase doesn't have support to cloud firestore. It has support for realtime database.
Whatever you do transactions with pyrebase, they will be stored and fetched from realtime database.
If you need to work on firestore,use firebase_admin sdk.
follow this link for reference...
https://github.com/thisbejim/Pyrebase/issues/268#issuecomment-545557451

Thank you for your help. Since it don't have support I'll change to realtime database or firebase_admin lib.

Thank you for your help. Since it don't have support I'll change to realtime database or firebase_admin lib.

@JuniorGunner, I hope you made it work. I am also in a similar situation. If your app worked, can you please share your code with me? Like, I need to understand how you made it work. Thank you. You can make it as an answer to this.


"HTTP Error 502.5 - Process Failure" asp.net core error in Azure

Hi;
I just deployed my asp.net core app to azure which I developed in mac os x. It is successfully build and run on my local environment.
But when I browse the app on Azure site, I got the following error.

I checked the link in error https://docs.asp.net/en/latest/publishing/iis.html#common-errors for some info but could not link with my issue.
Also when I check Azure logs, in Application Logs, I have

HTTP Error 502.5 - Bad Gateway
The specified CGI application encountered an error and the server terminated the process.
Most likely causes:
The CGI application did not return a valid set of HTTP errors.A server acting as a proxy or gateway was unable to process the request due to an error in a parent gateway.

Also some additional info in Application Logs

Requested URL--http://maping:80/ (this line seemed interesting to me)
Physical Path--D:\home\site\wwwroot

My web.config is like below;
<?xml version="1.0"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
    </handlers>
    <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />
  </system.webServer>
</configuration>

And finally my project.json file;

`
{
  "buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true
  },
  "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.0.0",
      "type": "platform"
    },
    "Microsoft.AspNetCore.Mvc": "1.0.0",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
    "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
    "Microsoft.Extensions.Configuration.Json": "1.0.0",
    "Microsoft.Extensions.Logging": "1.0.0",
    "Microsoft.Extensions.Logging.Console": "1.0.0",
    "Microsoft.Extensions.Logging.Debug": "1.0.0",
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0"
  },
  "frameworks": {
    "netcoreapp1.0": {}
  },
  "publishOptions": {
    "include": [
      "wwwroot",
      "Views",
      "appsettings.json",
      "web.config"
    ]
  },
}`

Any idea?

I have also below properties for project.json

 "tools": {
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
  },
  "scripts": {
    "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"
  }

I have also below properties for project.json
"tools": {
   "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
 },
 "scripts": {
   "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"
 }

Check your event logs in D:\home\Logfiles\EventLog.xml
RE: https://blogs.msdn.microsoft.com/puneetgupta/2014/09/24/azure-website-siteextension-to-view-eventlogs/

@ardacetinkaya Can you also share the web.config file in your publish path?  publish-iis modifies that file (or is supposed to modify it)

@muratg you can close this issue,after some check I found the problem which is related with my configuration.

@ardacetinkaya what was the issue with your configuration? I'm having the same problem.

I upgraded to asp.net core 1.0.1 today and this started appearing for me.
I'd assume that it might have something to do with the project.json file.  I wonder if we need to add a new line to the 'runtimes' section.
"runtimes": {
    "win10-x64": {}
},

@iwasdavid my problem is about application path that I do the deployment. There was wrong binaries.
@ZombiesWithCoffee I am not sure but .NET Core in Azure might be still 1.0.0

@ZombiesWithCoffee if @ardacetinkaya's comment doesn't help, please share your web.config (in the publish path).

Will do muratg,
I've been posting to my Azure website nearly daily with updates without any issue.  Once I upgraded to 1.0.1 this morning, I now only get HTTP Error 502.5 - Process Failure.  Uninstalling only made things worse.
web.config
'

<system.webServer>

</system.webServer>

'
project.json
`{
"userSecretsId": "aspnet-SafeInvestigation-a7ae238a-cbe6-407a-b9e2-eb10cf893b2c",
"dependencies": {
    "Microsoft.ApplicationInsights.AspNetCore": "1.0.0",
    "Microsoft.AspNetCore.Authentication.Cookies": "1.0.0",
    "Microsoft.AspNetCore.Diagnostics": "1.0.0",
    "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.0.0",
    "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0",
    "Microsoft.AspNetCore.Razor.Tools": {
        "version": "1.0.0-preview2-final",
        "type": "build"
    },
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
    "Microsoft.AspNetCore.StaticFiles": "1.0.0",
    "Microsoft.EntityFrameworkCore.Tools": {
        "version": "1.0.0-preview2-final",
        "type": "build"
    },
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
    "Microsoft.Extensions.Configuration.Json": "1.0.0",
    "Microsoft.Extensions.Configuration.UserSecrets": "1.0.0",
    "Microsoft.Extensions.Logging": "1.0.0",
    "Microsoft.Extensions.Logging.Console": "1.0.0",
    "Microsoft.Extensions.Logging.Debug": "1.0.0",
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0",
    "Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
        "version": "1.0.0-preview2-final",
        "type": "build"
    },
    "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": {
        "version": "1.0.0-preview2-final",
        "type": "build"
    },
    "Microsoft.AspNetCore.Session": "1.0.0",
    "LinqKit.Microsoft.EntityFrameworkCore": "1.0.5",
    "Microsoft.AspNetCore.Mvc": "1.0.1",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
    "Microsoft.EntityFrameworkCore.SqlServer": "1.0.1",
    "Microsoft.EntityFrameworkCore.SqlServer.Design": "1.0.1",
    "Microsoft.NETCore.App": "1.0.1"
},

"tools": {
    "BundlerMinifier.Core": "2.2.281",
    "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final",
    "Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final",
    "Microsoft.Extensions.SecretManager.Tools": "1.0.0-preview2-final",
    "Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
        "version": "1.0.0-preview2-final",
        "imports": [
            "portable-net45+win8"
        ]
    }
},

"frameworks": {
    "netcoreapp1.0": {
        "imports": [
            "dotnet5.6",
            "portable-net45+win8"
        ]
    }
},

"buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true
},

"runtimeOptions": {
    "configProperties": {
        "System.GC.Server": true
    }
},

"publishOptions": {
    "include": [
        "wwwroot",
        "Views",
        "Areas/**/Views",
        "appsettings.json",
        "web.config"
    ]
},

"runtimes": {
    "win10-x64": {}
},

"scripts": {
    "prepublish": [ "bower install", "dotnet bundle" ],
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
}

}
`

Either you showed web.config before publishing or publish-iis failed (should print an error). These:
processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" should be replaced with the actual values.

You're right.  I showed the 'before' web.config - I was sitting here editing my post at least 20 times to get the formatting right.
Here is the post process web.config
`

<system.webServer>

</system.webServer>

`

This config looks good. Check the Azure equivalent of event log. Also, enable std out logging (by flipping stdoutLogEnabled to true and check the contents of the stoud file. You should get some details as to what is happening.

Excellent suggestion on the stdoutLogEnabled.
I'm finally seeing something.
     fail: Microsoft.EntityFrameworkCore.Query.Internal.SqlServerQueryCompilationContextFactory[1]
     An exception occurred in the database while iterating the results of a query.
  System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.TdsParser' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SNILoadHandle' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'sni.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
     at System.Data.SqlClient.SNINativeMethodWrapper.SNIInitialize(IntPtr pmo)

I wonder if it is a bitness issue. @divega will know more.

Yeah I suspect @moozzyk is correct. Azure Websites do not support 64 bit apps currently. I recommend trying out 32 bits

Err, I've been posting my site on Azure since asp.net core went live.  Why does an upgrade to 1.0.1 break it?

So @moozzyk or @muratg, does anyone have any suggestions on how to get my website back up and running again?  This version 1.0.1 is an absolute development killer.

/cc @bricelam

@saurabh500 see https://github.com/aspnet/IISIntegration/issues/252#issuecomment-247686538. Any changes in SqlClient in 1.0.1 that could cause issues with loading sni.dll again?

@divega No changes from Data team for 1.0.1 to SqlClient

Thanks @saurabh500. @muratg should we reactivate this or create a new issue? Also, do you think this could be an issue with the shared framework?
It has been reported also at https://blogs.msdn.microsoft.com/webdev/2016/09/13/asp-net-core-sept-2016-patch/#comments

Could it have something to do with the new "runtimes" requirement in project.json?  I had to add it just to get 1.0.1 to run locally.  Is there a different runtime for Azure?
    "runtimes": {
        "win10-x64": {}
    },

When I browse my website on Server Explorer, I see
    /Files/runtimes/win
    /Files/runtimes/win7-x64
    /Files/runtimes/win7-x86

I have the same issue; does anyone have any suggestions to fix it?

I'm trying something out, I hope to let you know in 30 more mins.

I finally figured out the issue!  When you upgraded your app, your 'Microsoft.NETCoreApp' setting in your project.json was changed to
        "Microsoft.NETCore.App": "1.0.1",
This generated an error message that told us to change the project file to include a runtime section.  So I changed mine to this after reading several posts.
"runtimes": {     "win10-x64": {} },
The correct answer was to fix the setting by fixing the App 'type'.
        "Microsoft.NETCore.App": {             "version": "1.0.1",             "type": "platform"         },

@ZombiesWithCoffee Thanks, it works now!

@ZombiesWithCoffee I'm having the exact same issue except I'm using NET46 instead of ASPNET Core so I don't have the "Microsoft.NETCore.App" dependency.
Also, I've turned on stdoutlogging however the files are empty. Web.config looks fine:
`

<system.webServer>

</system.webServer>

`
Project.json:
`{
"dependencies": {
"Microsoft.AspNetCore.ReactServices": "1.0.0-*",
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Razor.Tools": {
"version": "1.0.0-preview2-final",
"type": "build"
},
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Configuration.CommandLine": "1.0.0",
"Microsoft.Extensions.Logging": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"EntityFramework": "6.1.3",
"Migrator.EF6.Tools": {
"version": "1.0.1",
"type": "build"
},
"System.Linq": "4.1.0",
"Newtonsoft.Json": "9.0.1",
"Microsoft.Azure.KeyVault.Core": "1.0.0",
"Microsoft.AspNetCore.Identity": "1.0.0",
"MR.AspNet.Identity.EntityFramework6": "2.0.0",
"CommonServiceLocator": "1.3.0",
"Microsoft.Extensions.Options": "1.0.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
"Microsoft.Bcl.Build": "1.0.21",
"Autofac.Extensions.DependencyInjection": "4.0.0",
"Autofac.Extras.CommonServiceLocator": "4.0.0",
"Microsoft.Bcl": "1.1.10",
"ISO3166": "1.0.1",
"WindowsAzure.Storage": "7.2.1",
"Hangfire.Core": "1.6.4",
"Microsoft.AspNetCore.Mvc": "1.0.1",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
"Hangfire.AspNetCore": "1.6.4",
"Hangfire.SqlServer": "1.6.4",
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0",
"Microsoft.AspNetCore.Authentication.Facebook": "1.0.0",
"Microsoft.AspNetCore.Authentication.Google": "1.0.0",
"Hangfire.Autofac": "2.2.0"
},
"tools": {
"Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
"Microsoft.Extensions.SecretManager.Tools": "1.0.0-preview2-final",
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final",
"Microsoft.DotNet.Watcher.Tools": "1.0.0-preview2-final",
"Migrator.EF6.Tools": {
"version": "1.0.1",
"imports": "portable-net45+win8+dnxcore50"
}
},
"frameworks": {
"net46": {
"dependencies": {
"Authentication": {
"target": "project"
},
"Common": {
"target": "project"
},
"Domain": {
"target": "project"
},
"EFStorageProvider": {
"target": "project"
},
"Models": {
"target": "project"
},
"Services": {
"target": "project"
}
}
    }
},
"buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true
},

"runtimeOptions": {
    "configProperties": {
        "System.GC.Server": true
    }
},

"publishOptions": {
    "include": [
        ".babelrc",
        "appsettings.json",
        "App",
        "node_modules",
        "typings",
        "Views",
        "tsconfig.json",
        "tsd.json",
        "web.config",
        "webpack.*.js",
        "wwwroot"
    ]
},

"scripts": {
    "prepublish": [
        "npm install"
        // "node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js",
        // "node node_modules/webpack/bin/webpack.js"
    ],
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
},

"tooling": {
    "defaultNamespace": "WebUI"
}

}
`

I don't see anything obvious yet.  You said that you had stdOutLog enabled, but you posted web.config with
    stdoutLogEnabled="false"

Ah sorry about that, I've been pushing a ton to try and debug this. It was enabled, and it does create the stdOutLog files but they are completely empty. Trying with the runtime piece right now to see if it does anything.

A completely random untested shot in the dark...  Try fixing it like I fixed mine.  Replace
          "Microsoft.AspNetCore.Mvc": "1.0.1",

With
          "Microsoft.AspNetCore.Mvc": { "version": "1.0.1", "type": "platform" },

Good thought, but that seems to just break the public with a null reference error here:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Publishing.targets(149,5): Error : Object reference not set to an instance of an object.
    <Publish       RuntimeToolingDirectory ="$(SDKToolingDirectory)"       ProjectFolder="$(MSBuildProjectDirectory)"       Project="$(KPackWorkingDirectory)"       Runtime="$(FinalPublishVersion)"       WwwRoot="$(WebRoot)"       WwwRootOut="$(WwwRootOut)"       NoSource="$(NoSourceFlag)"       Quiet="$(QuietFlag)"       IncludeSymbols ="$(IncludeSymbolsFlag)"       Native ="$(NativeFlag)"       Configuration="$(PublishConfiguration)"       Out="$(PublishOutputPathNoTrailingSlash)"       ExternalToolsPath="$(ExternalToolsPath)"       IsFilePreview="$(FilePreview)"        IISCommand="$(IISCommand)"       SDKToolingIdentifier="$(SDKToolingIdentifier)"       PublishFramework="$(PublishFramework)"       PublishRuntime="$(PublishRuntime)"       NoBuild="$(NoBuildFlag)"       BuildOutDirectory ="$(BuildOutDirNoSlash)"        EnvironmentVariables="@(DnuPublishEnvironmentVariables)"/>
Thanks for the help @ZombiesWithCoffee, but this issue seems to be related to net46 pretty heavily. I'm going to try rolling back to 1.0.0 for the time being and open a new ticket.

Did you check eventLog? Since stdoutLog is created I assume AspNetCoreModule is trying to do something so it should write failures to eventLog. Have you also tried running the application directly? - go to the folder where the application is published and try running it directly (I assume it will actually work - if it failed you would see something in the stdoutLog). Remember that IIS runs as a different user so it might be an issue with permissions.

@moozzyk Yep. See:
https://github.com/aspnet/IISIntegration/issues/270
It's Azure so I don't really have any permission options AFAIK.

I have the same 502.5 error (when using dotnet461), heres a repro:
File > new ASP.NET Core 1 > Empty project
Build > Publish > Azure with default settings > Outputs Hello world! correctly
Change project.json to contain:
 "frameworks": {
    "net461": {}
  },

And remove "Microsoft.NETCore.App" reference. (This is the same as starting a new blank Core 1 project on .Net Framework)
Build > Publish > Azure with default settings > Gives HTTP Error 502.5 - Process Failure
Enabling stdout logging shows this error on the azure platform:

Unhandled Exception: System.TypeInitializationException: The type initializer for 'Microsoft.Extensions.PlatformAbstractions.PlatformServices' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.AppContext, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
   at Microsoft.Extensions.PlatformAbstractions.ApplicationEnvironment.GetApplicationBasePath()
   at Microsoft.Extensions.PlatformAbstractions.ApplicationEnvironment..ctor()
   at Microsoft.Extensions.PlatformAbstractions.PlatformServices..ctor()
   at Microsoft.Extensions.PlatformAbstractions.PlatformServices..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildHostingServices()
   at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
   at WebApplication15.Program.Main(String[] args) in MY PROJECT PATH/Program.cs:line 14

When publishing, do you have 'Remove additional files at destination' checked in the 'Settings' area of the publish window?
I literally went into my azure server and deleted every single assembly one at a time.  Was the only way I got around the 502.5 error.

@ZombiesWithCoffee ive tried with a checked "remove additional" files for all my slots with a clean core 1 project without luck. From you suggestion ive created a new webapp in azure and publishing to that works, so I obviously cant trust the "remove files" option. How did you clean you server? Via ftp?

I'm embarrassed to say that I went into 'Server Explorer' via Visual Studio and manually deleted the files one at a time.  It was therapeutic.  I'm positive that there is a much better way to do it.

I found that when you change frameworks in your project.json and republish the application to Azure (the same location/slot) the publish tool won't replace dlls at the target location if the names are the same. As a result you end up with stale dlls and you application won't work because after you have changed the framework it needs different versions. So yes, if you change the target framework you need to go to your Azure folder containing the old application and nuke all the dlls. I raised this issue with the tooling folks.
You can find more details in this thread: https://github.com/aspnet/Hosting/issues/801#issuecomment-227920473

Here's my problem and my solution:
Problems:

After upgrade Microsoft.NETCore.App to 1.0.1, I get 502.5 error when I use iis express.
Change Microsoft.NETCore.App to 1.0.0, everything is OK.
Publish to my server, both 1.0.1 and 1.0.0 are OK.

Solution:
Install .NET Core 1.0.1 - VS 2015 Tooling Preview 2 in my computer.
Now I can work with Microsoft.NETCore.App 1.0.1 using iis express.

Removing the files worked for me too - the problem occurs when you change target frameworks between publishes.
You can easily delete all files using Kudu. Go to a CMD prompt, CD in to the wwwroot folder and type del /S * - that will delete all the old files :)

Thanks @jakkaj this trick worked for me too. I didn't even changed target framework, but was still having this problem during continuous deployments. Lets see how long this works now.

Perhaps differing versions on your dev machine to Azure?

My problem:
Upgrade ASP.NET Core WebAPi to 1.1.0
If I publish to Azure from VS trough Publish action everything is OK.
If I user Visual Studio Team Service Build and Release I get HTTP Error 502.5 - Process Failure.
I found out the problem is in web.config.
When published trough Visual Studio:
<aspNetCore processPath="dotnet" arguments=".\Cvetlicarna.Web.dll" stdoutLogEnabled="true" stdoutLogFile="\\?\%home%\LogFiles\stdout" forwardWindowsAuthToken="false" />
Publish from VSTS:
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
If I manually change this line on Azure, page works fine.
Why isn't web.config changed by VSTS Build and Release process?

You are hitting a known issue where 1.1 runtime is not installed on VSTS agents. See this comment for resolution: https://github.com/aspnet/Hosting/issues/892#issuecomment-263407934
Same issue described here: https://github.com/aspnet/Home/issues/1842
/CC @muratg

Tnx @moozzyk
reverting to:
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
worked

Azure deployment happened successfully, but running app gives following error:

I haven't upgraded to new csproj yet and running using project.json with .net core 1.1 framework and targetting following sdk in global.json to force it to use this version:
{
    "projects": [
    ],
    "sdk": {
        "version": "1.0.0-preview2-1-003177"
    }
}

No idea what this error means. Anyone is aware of this issue?

That's the ONLY thing I could get with it.  After a week, I finally abandoned the full .NET Framework and trying to switch to core, and I am still down.

@asadsahi Turn on STDOUT logging and see if anything pops up in there, also check all the Azure logs. I've seen that happen before and its usually due to something crashing in the startup class.

Thanks for the reminder dcarl1.
Try this
var webHost = new WebHostBuilder()
.CaptureStartupErrors(true)
.UseSetting("detailedErrors", "true")
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup();
        // For debugging startup errors

        webHost.CaptureStartupErrors(true);
        webHost.UseSetting("detailedErrors", "true");

        webHost.Build().Run();

The startup errors one is :sparkles: auto-magical :sparkles: ...
https://github.com/aspnet/IISIntegration/blob/e4cf12017b90a28379650987b58c3d77cdb2a5cb/src/Microsoft.AspNetCore.Server.IISIntegration/WebHostBuilderIISExtensions.cs#L49

[Sorry ... thought I pasted the wrong link there for a sec.]
The CaptureStartupErrors() is automatically done under UseIISIntegration() ...
https://github.com/aspnet/IISIntegration/blob/e4cf12017b90a28379650987b58c3d77cdb2a5cb/src/Microsoft.AspNetCore.Server.IISIntegration/WebHostBuilderIISExtensions.cs#L49

@ZombiesWithCoffee I should mention we are using the full .NET framework on Azure with 1.1 (xproj not csproj). Didn't really change anything other then package versions.
So far no issues. Deployment went out last night so we will see if those CGI errors show up again.

I'm extremely happy for you @dcarl1 !  I had absolutely no luck and eventually had to delete and recreate my app services.  And I'm still down!
@GuardRex, thanks for the update! I'll remove that from my startup code.

@ZombiesWithCoffee Post your project.json if you want, I can diff it with mine see if anything sticks out.

All I am getting at this time is the terribly generic error
   The specified CGI application encountered an error and the server terminated the process.

I believe that this problem is related to the issue, that publishing doesn't show the "Entity Framework Migrations" option.  Thanks for the offer to help though!
https://forums.asp.net/t/2111466.aspx?Publishing+doesn+t+show+the+Entity+Framework+Migrations+
http://stackoverflow.com/questions/41004824/asp-net-core-project-publish-doesnt-show-the-database-migrations-option

That error just means Kestrel has crashed (or timed out. I've seen it on super long requests). You might have to dig into the stdout and Azure logging but there should be another error somewhere.
Unfortunately we use EF6 and an adapter and do all migrations through SQL so I can't help there :( Best of luck.

@dcarl1 @ZombiesWithCoffee , thanks for pointing out enabling the errors. My issue was a runtime error, which wasn't happening during dev or even in production build locally. Only when I was deploying to azure. Here is the code:
 services.AddDbContext<ApplicationDbContext>(options =>
            {
                string useSqLite = Configuration["Data:useSqLite"];
                if (useSqLite.ToLower() == "true")
                {
                    options.UseSqlite(Configuration["Data:SqlLiteConnectionString"]);
                }
                else
                {
                    options.UseSqlServer(Configuration["Data:SqlServerConnectionString"]);
                }

            });

So, I added UseSqlServer in options, but the "Microsoft.EntityFrameworkCore.SqlServer": "1.1.0",package wasn't added. So this was causing a runtime error, and only on Azure. Neither running locally or a production build was causing any issues.

See: https://github.com/aspnet/Home/issues/1842#issuecomment-265951372

Wow, this killed my productivity for a whole day. This thread did not help me specifically, but it was the best one that I could find in searching. I wanted to leave my findings here in case others find it and need a different option:
I created a new project with VS and it published fine. So, I started copying files over to see if I could introduce the error. Nope, the new project published just fine to Azure with the same startup, project.json, web.config and all the content files.
Finally, I got WinMerge and found a few differences:

SolutionFiles/global.json had a different SDK version, so I changed that to match new newer version
PublishProfiles was different, so I deleted all my old publish profiles and started over

That fixed it!

I did the same thing @ricklove .  I finally had to break down for the 6th time and recreate the project from scratch to finally get it to work again.  So it's definitely not a code issue.
I wish my problem was a simple as the global.json file.  Mine are the same.

Definitely a very frustrating experience after having no problems publishing with this project and then all of a sudden it blew up. It had been about a month since I had published with this project (but never had a problem with it) and I may have updated other projects and maybe the VS tooling or something.
The project was originally a RC2 project and is now at 1.0.1. I was just happy it worked and didn't bother trying to upgrade to the latest.

I commented the sdk version from global.json in the solution and the deployment to azure started working fine.
{
  "projects": [ "src", "test" ]
  //,
  //"sdk": {
  //  "version": "1.0.0-preview2-003131"
  //}
}

Just an FYI for anyone finding this error. My problem causing it was because I use Kestrel with HTTPS in my startup and provide it a development key. That key doesn't exist on azure and never will, so it throws an exception. I solved it by the following technique:
    public class Program {
        public static void Main(string[] args) {
            var host = new WebHostBuilder()
                .UseContentRoot(Directory.GetCurrentDirectory())
                .UseStartup<Startup>();

            if (Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") == "Development") {

                host.UseKestrel(options => {
                    var pfxFile = "kestrel-dev-cert.pfx";
                    options.UseHttps(pfxFile, "password");
                })
                .UseUrls("https://localhost:44348");
            } else {
                host.UseKestrel();
            }

            var hostbuilder = host.UseIISIntegration()
            .Build();

            hostbuilder.Run();
        }
    }

This allows me to run kestrel in https locally, but use IIS for https when deployed to Azure without throwing any missing file exceptions.

@nilavghosh you saved my life. Thanks.

问题解决了！
原因是升级.NET Core版本后引起的问题。
查看你的xxx.runtimeconfig.json文件
  "runtimeOptions": {
    "framework": {
      "name": "Microsoft.NETCore.App",
      "version": "1.1.2" <-- (1.1.0 )此处改为安装版本即可
    },
    "configProperties": {
      "System.GC.Server": true
    }
  }
}

I'm getting this error too in a .NETCoreApp 1.1 application deployed to an App Service on Azure , and I've enabled every debugging thing I can find and I still can't see what's going on.  This was working until I redeployed it.
After executing dotnet publish I edited this line in "web.config":

After uploading, the dotnetcore_*.log file shows me this:
Starting on http://<IP_ADDRESS>:5000
warn: Microsoft.AspNetCore.Server.Kestrel[0]
      Unable to bind to http://localhost:31657 on the IPv6 loopback interface.
System.AggregateException: One or more errors occurred. (Error -4090 EADDRNOTAVAIL address not available) ---> Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -4090 EADDRNOTAVAIL address not available
   at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.tcp_bind(UvTcpHandle handle, SockAddr& addr, Int32 flags)
   at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvTcpHandle.Bind(ServerAddress address)
   at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.TcpListener.CreateListenSocket()
   at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Listener.<StartAsync>b__8_0(Object state)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at Microsoft.AspNetCore.Server.Kestrel.Internal.KestrelEngine.CreateServer(ServerAddress address)
   at Microsoft.AspNetCore.Server.Kestrel.KestrelServer.Start[TContext](IHttpApplication`1 application)
---> (Inner Exception #0) Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -4090 EADDRNOTAVAIL address not available
   at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.tcp_bind(UvTcpHandle handle, SockAddr& addr, Int32 flags)
   at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvTcpHandle.Bind(ServerAddress address)
   at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.TcpListener.CreateListenSocket()
   at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Listener.<StartAsync>b__8_0(Object state)<---

Hosting environment: Production
Content root path: D:\home\site\wwwroot
Now listening on: http://localhost:31657
Application started. Press Ctrl+C to shut down.

Is this the problem or is it just a warning?  It says there's an error binding to port 31657 on IPv6, but at the end it's saying it is indeed listening on port 31657.
Other than that, I have several other directories under /LogFiles, but I've looked at all these and don't see anything that seems like an error:
/Application
/DetailedErrors
/http/RawLogs
/kudu/deployment
/kudu/trace
/SiteExtensions/Kudu
/W3SVC1142139096
ApplicationInsightsExtension.log
dotnetcore_10388_20177761539.log
eventlog.xml

The last event in EventLog.xml is:
<Event>
    <System>
        <Provider Name="IIS AspNetCore Module"/>
       <EventID>1001</EventID>
       <Level>0</Level>
       <Task>0</Task>
       <Keywords>Keywords</Keywords>
       <TimeCreated SystemTime="2017-07-07T06:15:47Z"/>
       <EventRecordID>1151159015</EventRecordID>
       <Channel>Application</Channel>
       <Computer>RD00155DFBE915</Computer>
       <Security/>
    </System>
    <EventData>
        <Data>Application 'MACHINE/WEBROOT/APPHOST/ZEPTAPI__7BE4' started process '6672' successfully and is listening on port '31657'.</Data>
    </EventData>
</Event>

Not sure what else to do.
In the "Diagnose and solve problems" option, it says "Your app is healthy right now.".

@mikebridge I see this error for my apps as well. I don't think it's an actual issue. My apps are running fine on Azure with this initial error.
I would recommend adding more logging, e.g. in the Startup process to find out if something might be going on there.

EADDRNOTAVAIL for IPv6 on Azure is benign/informational and there are changes in 2.0 to not log the stack trace. See more details here: https://github.com/aspnet/KestrelHttpServer/issues/1001

@raRaRa & @moozzyk thanks, that at least eliminates some of the potential issues.
I found this opaque error but no idea what it means:
Application 'MACHINE/WEBROOT/APPHOST/******' with physical root 'D:\home\site\wwwroot\' failed to start process with commandline 'dotnet .\Api.dll', ErrorCode = '0x80004005 : 8000808c.

Maybe this.
Running dotnet --info from the azure portal console log gives me this:
> dotnet --info
D:\
.NET Command Line Tools (2.0.0-preview2-006497)

Product Information:
 Version:            2.0.0-preview2-006497
 Commit SHA-1 hash:  06a2093335

Runtime Environment:
 OS Name:     Windows
 OS Version:  6.2.9200
 OS Platform: Windows
 RID:         win8-x86
 Base Path:   D:\Program Files (x86)\dotnet\sdk\2.0.0-preview2-006497\

In development I'm running 1.0.4---is it using the wrong version of dotnet?  I don't see any way to select the version.
I really have no clue what to do here....

Ok, the issue is that I need to explicitly modify the reference in .csproj from netcoreapp1.1 to netcoreapp1.1.2:
<TargetFramework>netcoreapp1.1.2</TargetFramework>

This seems to bring up the site with no errors.

I'm experiencing the same issue in Azure on a ASP.NET Core 2.0 Preview 2 app, and this is the error I'm getting in STDOUT:
Error:
  An assembly specified in the application dependencies manifest (Accrue.Web.deps.json) was not found:
    package: 'Microsoft.AspNetCore.Mvc.Razor.ViewCompilation', version: '2.0.0-preview2-final'
    path: 'lib/netcoreapp2.0/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.dll'

  This assembly was expected to be in the local runtime store as the application was published using the following target manifest files:
    aspnetcore-store-2.0.0-preview2-final-osx-x64.xml;aspnetcore-store-2.0.0-preview2-final-linux-x64.xml

First thing that jumps out is that this version was installed using a MacOS/Linux manifest, but I've confirmed that this running on Windows.
I should point out that my .csproj file shows: <TargetFramework>netcoreapp2.0</TargetFramework>
Any ideas?

UPDATE: I solved the problem by setting my RuntimeIdentifier to the same runtime as my Azure Web App, (<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>) and redeployed. This did a full XCOPY deployment to Azure, which executed just fine.
I'm not sure that this solves the core underlying issue in Azure, but at least my code is working.
As an aside, it seems obvious that VS2017.3 should detect your Azure settings, including what version of .NET Core is installed on the server, and wherever possible, automagically do what is necessary to get your app working. I will open some feedback to that effect on the VS portal and attempt to get it the proper visibility.

@robertmclaws some possibly related discussion on https://github.com/Azure/app-service-announcements-discussions/issues/2

Thanks @davidebbo!

Did this issue ever get fixed in production?

I don't remember all the details on this issue, but I think Azure production is fully deployed with all known fixes.

I'm running into this issue, too, although I'm trying to use the .NET Core 2.0 RTM (26423) bits.
Logs show this error:

Error:
An assembly specified in the application dependencies manifest (MyApp.deps.json) was not found:
package: 'Microsoft.ApplicationInsights.AspNetCore', version: '2.1.1'
path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'
This assembly was expected to be in the local runtime store as the application was published using the following target manifest files:
aspnetcore-store-2.0.0-rtm-26423-linux-x64.xml;aspnetcore-store-2.0.0-rtm-26423-osx-x64.xml;aspnetcore-store-2.0.0-rtm-26423-win7-x64.xml;aspnetcore-store-2.0.0-rtm-26423-win7-x86.xml

The 2.0 RTM Azure deployment has only just started. https://github.com/Azure/app-service-announcements-discussions/issues/6

Figured that was the case.  Thanks for the update - will watch that thread.

Hi all,
Apologies up front, I am basically new to .NET. I read this discussion top to bottom, as I am encountering the same error message. Open to thoughts if anyone has any. Here is what I figured out in my situation. I have .NET Core 2.0 API. If I remove web.config and publish to Azure, the API works. Inside the web.config file in my project (yes, on recompile it reappears), I have

After banging my head against the wall for about a day, I realize now why the same API fails if I proceed to publish a second time. On the second pass (assuming I do not manually remove web.config first), the web.config file is edited (again, not by me, but by the compiler) and now looks like this:

At which point Azure throws our beloved error message.
If I remove web.config and start over, the API is happy (1st publish) and then sad (2nd publish) in reliable sequence.
What I can't figure out is what to do about it. I'm not the one putting two flavors of web.config together. The compiler is doing it.
Thoughts? Again, I'm very new to virtually everything start to finish... so there are a thousand things I might be doing wrong in my learn-everything never-done-this-before project.

Hi all,
Apologies up front, I am basically new to .NET. I read this discussion top to bottom, as I am encountering the same error message. Open to thoughts if anyone has any. Here is what I figured out in my situation. I have .NET Core 2.0 API. If I remove web.config and publish to Azure, the API works. Inside the web.config file in my project (yes, on recompile it reappears), I have

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" forwardWindowsAuthToken="false" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" />
  </system.webServer>
</configuration>

After banging my head against the wall for about a day, I realize now why the same API fails if I proceed to publish a second time. On the second pass (assuming I do not manually remove web.config first), the web.config file is edited (again, not by me, but by the compiler) and now looks like this:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="bin\IISSupport\VSIISExeLauncher.exe" arguments="-argFile IISExeLauncherArgs.txt" forwardWindowsAuthToken="false" stdoutLogEnabled="false" />
  </system.webServer>
</configuration>

At which point Azure throws our beloved error message.
If I remove web.config and start over, the API is happy (1st publish) and then sad (2nd publish) in reliable sequence.
What I can't figure out is what to do about it. I'm not the one putting two flavors of web.config together. The compiler is doing it.
Thoughts? Again, I'm very new to virtually everything start to finish... so there are a thousand things I might be doing wrong in my learn-everything never-done-this-before project.

@wstllc Yeah, that looks like a tooling bug. Please report it to the tooling team via the VS "Send Feedback" tool.

Thx for thoughts, Tratcher, but before I bother them, here's what I figured out. (Bug? Feature? I'm too new to know...)
What I worked out did not involve removing the web.config file, so let that thought be. In below comments, presume file remains and is never deleted.
It turns out that if I do the following steps, publishing will succeed:

Use IIS Express profile
RUN it locally first, and THEN
Publish to Azure

Guaranteed routes to failure:
Option #1: Use IIS profile, run app locally, then publish.
Option #2: Use IIS profile, switch back to IIS Express and publish without first running under the Express profile.
In short, the web.config version last used when the project runs locally is what gets published, regardless of which profile you happen to have selected at the moment.
What I don't myself understand is why IIS Express uses this (which works great when publishing to Azure)...
`

`
...whereas IIS uses this (which is toxic to all API life forms on Azure)...
`

`
Tratcher, if you think that's a bug in Visual Studio, I'll do as you suggest -- otherwise I'll chalk this all up "part of my learning curve."
Thanks!

Definitely a bug. You should never end up with VSIISExeLauncher in your process path after publish. Please report it to VS.

Did so -- thx for feedback

I came across the similar issue when I deployed asp.net core 2.0 on Azure. I fixed it by removing  -argFile IISExeLauncherArgs.txt from below
<aspNetCore processPath="dotnet" arguments=".\xyz.dll -argFile IISExeLauncherArgs.txt" forwardWindowsAuthToken="false" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />

so it looks like
<aspNetCore processPath="dotnet" arguments=".\xyz.dll" forwardWindowsAuthToken="false" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />

I also tried by adding a dummy IISExeLauncherArgs.txt file but it didn't work. Removing it worked for me. I hope this helps someone..

See related issue https://github.com/aspnet/websdk/issues/242

i am facing the same issue, and i have tried all of the solutions in the thread but its not working.
i have a asp.net core 2.0 application which was working perfectly today it stopped suddenly and i am getting the issue
502 - Web server received an invalid response while acting as a gateway or proxy server.
There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.
since my application was asp.net core 1.1 and i have updated it to 2.0 i deleted the wwwroot folder and reuploaded the application still it doesnt work.
the application works perfectly locally
this is the webconfig

Please any help to solve this

@mlawand ... Can u paste in there the web.config, Program.cs, and Startup.cs (if you aren't using WebHost extensions for startup)? .... or put up a small GH repro project that we can see.
Also if you haven't seen it, we have an extensive troubleshooting section at: https://docs.microsoft.com/en-us/aspnet/core/publishing/iis?tabs=aspnetcore2x#troubleshooting-tips

@guardrex I have updated the post with web.config startup and program.cs i saw the link and went trough it

ok ... let me run an :eye: eye over it and see if anything jumps out.

@guardrex Thank you very much, i am hosting the application on Azure Web Apps With a standard S1 service plan

Anything in the logging in the Azure Portal? I don't think they enable it automatically; you probably need to activate it in the portal for the Azure App. It should then light-up and provide logging that describes where/how the app is choking.

@guardrex i updated the error log

I'm so used to hosting ASP.NET Core apps now with VM's under full IIS that I'm not so familiar with the Azure Apps portal. You probably saw that down in the Diagnostics Logs area that they have several logging options. Of course, they don't match the phrase "stdout logging," so I'd be inclined to switch them all on for troubleshooting, then shut them all off afterward.

Next tab down is Log stream, and you should get something helpful there. You really just need the stdout logging piped through. It should give some indication what the app is choking on.

Prob Application Logging (Filesystem) and Detailed error messages should do it.

@guardrex i updated the original post with the stdout logging

Expression: [Recursive resource lookup bug]
Description: Infinite recursion during resource lookup within System.Private.CoreLib. This may be a bug in System.Private.CoreLib, or potentially in certain extensibility points such as assembly resolve events or CultureInfo names. Resource name: ArgumentNull_Generic

Has a localization/culture 🐞 bug feeling to it. I'm not an expert in those areas (only dabble here and there when needed). Personally, I'd confirm that by disabling the code for localization. If the error goes away, then you know for sure that there's a problem there. Once you know for sure, I'd hit up the devs on Slack to see if anyone has some tips on troubleshooting the problem. Many devs there build localized apps. If you don't have access yet, the self-signup is here :point_right: http://tattoocoder.com/aspnet-slack-sign-up/

@guardrex Thank you very much will sign up and ask there much appreciated

I have the exact same error as @mlawand. I opened the issue here: https://github.com/dotnet/corefx/issues/24718
Also, after reverting to our .NET Core 1.2 version, I also get the same 502.5 error. Logs show:

Unhandled Exception: System.TypeInitializationException: The type initializer for 'System.Diagnostics.DiagnosticListener' threw an exception. ---> System.TypeLoadException: Could not load type 'System.Reflection.Assembly' from assembly 'System.Runtime, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
   at __EnsureBootstrap__System.Diagnostics.DiagnosticSource.dll()
   at System.Diagnostics.DiagnosticListener..cctor()
   --- End of inner exception stack trace ---
   at System.Diagnostics.DiagnosticListener..ctor(String name)
   at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices()
   at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
   at Our.WebApplication.Program.Main(String[] args) in C:\projects\our-webapplication\src\Our.WebApplication\Program.cs:line 15

I cannot get this error fixed! Looks like the whole server is broken now. Help is appreciated.

@razzemans please let me know if you find any solution for this issue

@mlawand I fixed this by going to Kudu of my web app, clicking Site Extensions, and removing the Application Insights Extension.

@razzemans i fixed my issue by creating a brand new application and migrating each part of the project to it. its a very lengthy process

@damccull Your solution end a painful day and a half stent of moving to Https for me. His solution resolved my 502.5 error after publishing to Azure with .netcore2.0

I solved this issue by excluding web.config from my project.
This means that when publishing, it creates default files as VS thinks there is no web.config, so Azure is happy, whilst the web.config is still on disk and available to local IIS.

@razzemans Thank you! Removing the Application Insights extension worked for me as well. I removed it in the Azure portal rather than Kudu.

I have the same issue after upgrading to AspNetCore 2.0.6, I removed the wwwroot folder, excluded the web.config and still the same in Azure.

@yosbeleg89 Did you run down the steps in the troubleshooting topic? https://docs.microsoft.com/aspnet/core/host-and-deploy/azure-apps/troubleshoot
That's a fairly new topic, and I'd be happy to hear your feedback on if the steps outlined in the topic lead to uncovering the problem with your deployment.

The 2.0.6 deployment to Azure hasn't finished yet. See https://github.com/Azure/app-service-announcements/issues/92

I wonder if it makes sense to deploy a new release to Azure first, then announce that the new release is available.

@guardrex unfortunately that's not really feasible. There is a bit of a chicken and egg problem, with things not fully working in Azure until the symbols are published by the Core team, and that doesn't happen until it's announced.
Deployment to App Service should normally be complete in a couple of days. You can test it now in West US 2 if you'd like.
That being said, I'm not sure that relates to the issue in this thread.


refactor: make Main a StmtKind in prql_ast

The types in prql_ast should model the language as closely as possible. You can never specify a name or a type for a main statement, so it should not use the VarDef struct in prql_ast. Moving the Main variant from VarDefKind to StmtKind also lets us make name in VarDef required.

Makes sense to me (albeit I'm not the authority here...)


Yellow font doesn't have every alphabet letter

Looks like we've finally finished adding these emojis.