FCM Push notifications do not work on iOS 11

I use Firebase as a backend. I also use FCM as one of the provided features from Firebase. FCM worked well in iOS 10, but after switching to iOS 11, push notifications stopped coming to user devices, and I myself did not receive any push notifications sent from the cloud functions or the Notification section in the Firebase Console. How to fix this problem?
Update: I sent several push notifications from Firebase Notifcations, but they do not come.
// MARK: - Push notification

extension AppDelegate: UNUserNotificationCenterDelegate {

    func registerPushNotification(_ application: UIApplication) {
        // For iOS 10 display notification (sent via APNS)
        UNUserNotificationCenter.current().delegate = self

        let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
        UNUserNotificationCenter.current().requestAuthorization(
            options: authOptions,
            completionHandler: {_, _ in })

        // For iOS 10 data message (sent via FCM)
        Messaging.messaging().delegate = self
    }

    func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
        //When the notifications of this code worked well, there was not yet.
        Messaging.messaging().apnsToken = deviceToken
    }

    // [START receive_message]
    func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any]) {
        // If you are receiving a notification message while your app is in the background,
        // this callback will not be fired till the user taps on the notification launching the application.
        // TODO: Handle data of notification
        // Print message ID.
        if let messageID = userInfo[gcmMessageIDKey] {
            debugPrint("Message ID: \(messageID)")
        }

        // Print full message.
        debugPrint(userInfo)
    }

    func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any],
                     fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
        // If you are receiving a notification message while your app is in the background,
        // this callback will not be fired till the user taps on the notification launching the application.
        // TODO: Handle data of notification
        // Print message ID.
        if let messageID = userInfo[gcmMessageIDKey] {
            print("Message ID: \(messageID)")
        }

        // Print full message.
        debugPrint(userInfo)

        completionHandler(.newData)
    }

    // showing push notification

    func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
        if let userInfo = response.notification.request.content.userInfo as? [String : Any] {
            let routerManager = RouterManager()
            routerManager.launchRouting(userInfo)
        }
        completionHandler()
    }

    func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
        if let userInfo = notification.request.content.userInfo as? [String : Any] {
            if let categoryID = userInfo["categoryID"] as? String {
                if categoryID == RouterManager.Categories.newMessage.id {
                    if let currentConversation = ChatGeneralManager.shared.currentChatPersonalConversation, let dataID = userInfo["dataID"] as? String  {
                        // dataID is conversationd id for newMessage
                        if currentConversation.id == dataID {
                            completionHandler([])
                            return
                        }
                    }
                }
            }
            if let badge = notification.request.content.badge {
                AppBadgesManager.shared.pushNotificationHandler(userInfo, pushNotificationBadgeNumber: badge.intValue)
            }
        }
        completionHandler([.alert,.sound, .badge])
    }

}

// [START ios_10_data_message_handling]
extension AppDelegate : MessagingDelegate {

    func messaging(_ messaging: Messaging, didRefreshRegistrationToken fcmToken: String) {
        let pushNotificationManager = PushNotificationManager()
        pushNotificationManager.saveNotificationTokenInDatabase(token: fcmToken, success: nil, fail: nil)
    }

    // Receive data message on iOS 10 devices while app is in the foreground.
    func application(received remoteMessage: MessagingRemoteMessage) {
        debugPrint(remoteMessage.appData)
    }

}

I have the same problem.

Hi @caiovidaln !
Please see my answer on my question https://stackoverflow.com/questions/46391818/fcm-push-notifications-do-not-work-on-ios-11 It helped me, I'm currently testing, so that everything works as before, but unfortunately it will be necessary to wait until Apple confirms the new Build.

We have the same issue. Once the app goes into the background, no pushes are received at all.

Also not receiving push notifications with iOS 11 and latest firebaseMessaging  2.0.3, firebase 4.2.0.  I have used the apps.sh script to test and i receive those notifications, but using the fcm id and sending through the console and I receive nothing.

I noticed from your code, you're not running the request for push authorization from application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions, perhaps you call it at later time?
I have similar issue. I updated to Firebase 4.2.0 and FirebaseMessaging 2.0.3, my issue is I'm not getting notification if I do request push notification at later time. (I'm doing soft request/custom dialog to check if user want to receive push notification, before using the system request). I was able to reproduce it from the quickstart project by adding a delay to the requestAuthorization for push.  Here's my SO thread: https://stackoverflow.com/questions/46443189/firebase-messaging-not-sending-notification-when-push-notification-authenticatio

There is a known issue where the FCM token is not always being associated with the APNs device token if UIApplication.shared.registerForRemoteNotifications() is not called early enough. This has  already been fixed in the FirebaseInstanceID SDK, and should be coming out soon.
In the meantime, you can:

Lock your FirebaseInstanceID pod to 2.0.0 in your Podfile, or

Ensure you're calling UIApplication.shared.registerForRemoteNotifications() on app start, ideally before FirebaseApp.configure().

For testing, you can trigger a new FCM token by uninstall/reinstall your debug app on your device.

Got it. do you have any ETA when the version will be released?
Tried to lock it, setting pod 'FirebaseInstanceID', '~> 2.0.0' , but it kept using the 2.0.3, How do I downgrade it?

@rsattar Thanks so much! Locking FirebaseInstanceID to 2.0.0 worked for me.
@ordinaryman09 remove the arrow for an exact match: pod 'FirebaseInstanceID', '2.0.0'

@ordinaryman09 to specify exact versions, you should use '= 2.0.0'. CocoaPods' ~> specifier will use the most recent compatible version.

Both downgrading the FirebaseInstanceID and FirebaseMessaging and placing the UIApplication.shared.registerForRemoteNotifications() as the first thing in the didFinishLaunchingWithOptions still doesn't work and gives a similar error. Is there anything else I can do?

@10686142 try uninstalling the app and reinstalling with the code changes, to ensure that a new FCM token gets issued

Yeah somehow I still can't get it to work, but maybe I did something wrong since I am new to this.  But maybe someone knows what it can be:
I followed this tutorial: https://www.youtube.com/watch?v=_jy_Hlskmiw&t=710s
Which came down to me delegate looking like this: https://github.com/douglasdevelops/PushNotificationSample/blob/master/PushNotificationSample/AppDelegate.swift
Is he maybe missing something is his explanation or am I missing something?
Thanks in advance!

Thanks @jtbh89 & @rsattar , I downgraded to 2.0.0 and it works for me now. @10686142 what messages are you seeing? Do you get the tokens?

2017-09-28 21:26:20.067218+0200 App Imperium News[1026:80671] [Firebase/Messaging][I-FCM002019] FIRMessaging received data-message, but FIRMessagingDelegate's-messaging:didReceiveMessage: not implemented
2017-09-28 21:27:05.337971+0200 App Imperium News[1026:80673] TIC Read Status [5:0x0]: 1:57
2017-09-28 21:27:05.338807+0200 App Imperium News[1026:80673] TIC Read Status [5:0x0]: 1:57

Yeah I did also receive the token. And I got it to work earlier today that I could also see the message in me debug log, but I always get that message about FIRMessagingDelegate's-messaging:didReceiveMessage: not implemented

I got it to work finally guys! I added this piece of code:
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
Messaging.messaging().apnsToken = deviceToken
}

Beginners mistake I think, thanks for your help! @rsattar @richardliveraise

it works for me after downgrading to 2.0.0, thanks guys!

@rsattar Without using CocoaPods, how is it possible to downgrade to 2.0.0 to fix this? Can you provide a link to download the working framework(s)?

@candywriter you can download the tar.gz from the link in the 2.0.0 podspec without using CocoaPods.
https://dl.google.com/dl/cpdc/9fe91bfb8772be4b/FirebaseInstanceID-2.0.0.tar.gz

@morganchen12 Thanks! Unfortunately manually replacing FirebaseInstanceID 2.0.3 with 2.0.0 produces a host of build errors.

I had no issues. Are you on the latest download besides that?

Try to set this, works for me:
       Messaging.messaging().shouldEstablishDirectChannel = true

Sorry, my memories solution isn't really the solution. Message just arrived when app is active.

Downgrading FirebaseInstanceID to 2.0.0 did not work for me either.
However, adding this did work:
Messaging.messaging().apnsToken = deviceToken
in didRegisterForRemoteNotificationsWithDeviceToken
I'm confused why it works because this is only supposed to be in place if you have swizzling disabled, which I don't.

The solutions presented above did not work for me. I am using FirebaseInstanceID: 2.0.0, FirebaseMessaging: 2.0.0, FirebaseCore: 4.0.7, Firebase: 4.2.0 and FirebaseAnalytics: 4.0.3. Testing with iOS 11.
The message arrives with the application active, but it does not arrives when is in background.
extension AppDelegate: UNUserNotificationCenterDelegate {
    // Receive displayed notifications for iOS 10 devices.
    func userNotificationCenter(_ center: UNUserNotificationCenter,
                                willPresent notification: UNNotification,
                                withCompletionHandler completionHandler:
        @escaping (UNNotificationPresentationOptions) -> Void) {
        completionHandler(.alert)
    }

    func userNotificationCenter(_ center: UNUserNotificationCenter,
                                didReceive response: UNNotificationResponse,
                                withCompletionHandler completionHandler: @escaping () -> Void) {
        completionHandler()
    }

    func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
        Messaging.messaging().apnsToken = deviceToken
    }

    func registerForPushNotifications(application: UIApplication) {

        FirebaseApp.configure()
        application.registerForRemoteNotifications()

        UNUserNotificationCenter.current().delegate = self

        let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
        UNUserNotificationCenter.current().requestAuthorization(
            options: authOptions,
            completionHandler: {_, _ in })

        Messaging.messaging().delegate = self
    }

    func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
        print("Notification: Unable to register for remote notifications: \(error.localizedDescription)")
    }

    func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any]) {
        NotificationCenterController.processMessage(userInfo)
    }

    func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
        NotificationCenterController.processMessage(userInfo)
        completionHandler(.newData)
    }

}

extension AppDelegate: MessagingDelegate {
    func messaging(_ messaging: Messaging, didRefreshRegistrationToken fcmToken: String) {
        print("Refresh Token")
    }

    // Receive data message on iOS 10 devices while app is in the foreground.
    func application(received remoteMessage: MessagingRemoteMessage) {
        NotificationCenterController.processMessage(remoteMessage.appData)
    }

}

+1, using all new (Podfile.lock)
- Firebase/Core (4.2.0):
    - FirebaseAnalytics (= 4.0.3)
    - FirebaseCore (= 4.0.7)
  - Firebase/Database (4.2.0):
    - Firebase/Core
    - FirebaseDatabase (= 4.0.3)
  - Firebase/Messaging (4.2.0):
    - Firebase/Core
    - FirebaseMessaging (= 2.0.3)```

Confirmed able to get push by APNS directly, not able to get push from firebase api/notification panel.

+1 to @farazq and overriding the swizzling method(s); even though I have set FirebaseAppDelegateProxyEnabled to NO in the Info.plist as the docs state, it seems to have no effect. (ie I am opting to NOT use method swizzling)
Using Cocoapods and FirebaseCore (4.0.7) FirebaseMessaging (2.0.3) for reference.

@lsalvoni I spent a few hours trying to understand wasn't working till i got to this thread.
The solution was moving my pods to this:
    pod 'Firebase/Core', '4.0.4'
    pod 'Firebase/Database', '4.0.4'
    pod 'Firebase/Messaging', '4.0.4'
    pod 'FirebaseInstanceID', '2.0.0'

@royherma

(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken  {
[FIRMessaging messaging].APNSToken = deviceToken;

and have you implemented these methods?

I just also met the same problem. O my got, I just spent 2 hours on nothing trying to fix the problem with the certificates and provision profiles. But the only solution, that worked for me too was to decrease 'FirebaseInstanceID' version to 2.0.0.  After this notifications started to deliver on my iOS device.

Hey everyone, we released FirebaseInstanceID 2.0.4 today, which should be resolving a lot of the issues related to notification delivery. Please update to that if you're still having trouble.

Hi, I update to FirebaseInstanceID 2.0.4 but not working

The application shows push on ios 10 and 11.1, but on 11.0.1-11.0.2 it does not work.
Writes
Ignoring notification with no alert, sound or badge (): 4BD0-6F71
[*] Not saving push notification 4BD0-6F71 to store [error = Error Domain = UNErrorDomain Code = 1401 "Notification has no user-facing content" UserInfo = {NSLocalizedDescription = Notification has no user- facing content}]
Pods:
Installing Firebase (4.3.0)
Installing FirebaseAnalytics (4.0.4)
Installing FirebaseCore (4.0.8)
Installing FirebaseInstanceID (2.0.4)
Installing FirebaseMessaging (2.0.4)
What's wrong?

Not working for me too. Still not receiving the notifications :(

I send notification with console of fireblade y with curl.  the old version of app receive notification
import UIKit
import Fabric
import Crashlytics
import UserNotifications
import FirebaseCore
import Firebase
import FirebaseMessaging
fileprivate let viewActionIdentifier = "VIEW_IDENTIFIER"
fileprivate let newsCategoryIdentifier = "NEWS_CATEGORY"
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    Fabric.with([Crashlytics.self])
    UNUserNotificationCenter.current().delegate = self

    // Override point for customization after application launch.
    registerForPushNotifications()

    // 1
    if let notification = launchOptions?[.remoteNotification] as? [String: AnyObject] {
        // 2
        let aps = notification["aps"] as! [String: AnyObject]
        print(aps)
        //_ = NewsItem.makeNewsItem(aps)
        // 3
       // (window?.rootViewController as? UITabBarController)?.selectedIndex = 1
    }

    FirebaseApp.configure()
    connectToFcm()
    Fabric.with([Crashlytics.self])

    return true
}

func applicationWillResignActive(_ application: UIApplication) {
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}

func applicationDidEnterBackground(_ application: UIApplication) {
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.

    Messaging.messaging().disconnect()
    print("Disconnected from FCM.")

}

func applicationWillEnterForeground(_ application: UIApplication) {
    // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}

func applicationDidBecomeActive(_ application: UIApplication) {
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

func applicationWillTerminate(_ application: UIApplication) {
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

////MARK: - Notification

// ojo fastlane sigh --development para generar certificado de develop

func application(_ application: UIApplication,
                 didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {

    let tokenParts = deviceToken.map { data -> String in
        return String(format: "%02.2hhx", data)
    }

    let token = tokenParts.joined()
    print("Device Token: \(token)")

    let tokenFIR = Messaging.messaging().fcmToken
    print("FIER TOKEN \(tokenFIR) fin")

}

/*func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) {

    print(userInfo)
}*/

func application(
    _ application: UIApplication,
    didReceiveRemoteNotification userInfo: [AnyHashable : Any],
    fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {

    let aps = userInfo["aps"] as! [String: AnyObject]

    if aps["content-available"] as? Int == 1 {
        /*let podcastStore = PodcastStore.sharedStore
        podcastStore.refreshItems { didLoadNewItems in
            completionHandler(didLoadNewItems ? .newData : .noData)
        }*/
    } else  {
        //_ = NewsItem.makeNewsItem(aps)
        completionHandler(.newData)
    }
}

func application(_ application: UIApplication,
                 didFailToRegisterForRemoteNotificationsWithError error: Error) {
    print("Failed to register: \(error)")
}

func registerForPushNotifications() {
    UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) {
        (granted, error) in
        print("Permission granted: \(granted)")

        guard granted else { return }

        let viewAction = UNNotificationAction(identifier: viewActionIdentifier,
                                              title: "View",
                                              options: [.foreground])

        let newsCategory = UNNotificationCategory(identifier: newsCategoryIdentifier,
                                                  actions: [viewAction],
                                                  intentIdentifiers: [],
                                                  options: [])

        UNUserNotificationCenter.current().setNotificationCategories([newsCategory])

        self.getNotificationSettings()
    }
}

func getNotificationSettings() {
    UNUserNotificationCenter.current().getNotificationSettings { (settings) in
        print("Notification settings: \(settings)")
        guard settings.authorizationStatus == .authorized else { return }
        DispatchQueue.main.async{
        UIApplication.shared.registerForRemoteNotifications()
        }
    }
}

// Firebase

func connectToFcm() {

    Messaging.messaging().shouldEstablishDirectChannel = true
    Messaging.messaging().connect { (error) in
        if (error != nil) {
            print("Unable to connect with FCM. \(error ?? "Sin error" as! Error)")
        } else {
            print("Connected to FCM.")
        }
    }
}

//Init session y login and pass in keychain

func loginWithKeychain() -> Bool{
    let keychainManager = userLoginKeychainManager()

    do {
        let user = try keychainManager.recoverData()
        if (!userManagerSession.getLogged()){
            userManagerSession.sharedInstance.initWithLogin(login: user)
        }
        return true
    }catch {
        print("User no register")
        return false
    }

}

}
extension AppDelegate: UNUserNotificationCenterDelegate {
func userNotificationCenter(_ center: UNUserNotificationCenter,
                            didReceive response: UNNotificationResponse,
                            withCompletionHandler completionHandler: @escaping () -> Void) {

    let userInfo = response.notification.request.content.userInfo
    let aps = userInfo["aps"] as! [String: AnyObject]

    /*if let newsItem = aps {
        (window?.rootViewController as? UITabBarController)?.selectedIndex = 1

        if response.actionIdentifier == viewActionIdentifier,
            let url = URL(string: newsItem.link) {
            //let safari = SFSafariViewController(url: url)
            //window?.rootViewController?.present(safari, animated: true, completion: nil)
        }
    }*/

    completionHandler()
}

}
extension AppDelegate : MessagingDelegate {
func messaging(_ messaging: Messaging, didRefreshRegistrationToken fcmToken: String) {
print(messaging)
}
func messaging(_ messaging: Messaging, didReceive remoteMessage: MessagingRemoteMessage) {
    print("mesaje")
}

// Receive data message on iOS 10 devices.
func application(received remoteMessage: MessagingRemoteMessage) {
    print("%@", remoteMessage.appData)
}

}

@rsattar I am sending notifications through https://console.firebase.google.com. If I target a specific FCM token the notification is sent, but sending to a User Segment -> App does nothing.
I register the token manually
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
    Messaging.messaging().apnsToken = deviceToken
}

but this does not help.
I have tried using 'FirebaseInstanceID', '2.0.0' with no success.
I have also moved UIApplication.shared.registerForRemoteNotifications() on app start, before FirebaseApp.configure() with no success.

Hi @rsattar,
I have exactly the same problem as what @o15a3d4l11s2 has. It would be great if we can hear from you soon.

Agree with all of the other posters: upgrading to Firebase 4.3 (and more specifically FirebaseInstanceID 2.0.4) does not fix the broken push notifications on iOS. Really poor effort by the Firebase team.

@candywriter are you saying 2.0.0 works for you and upgrading to 2.0.4 made it fail again?

In iOS11.0, there seems to be a problem with iOS itself in handling silent push notification.
https://stackoverflow.com/questions/44796613/silent-pushes-not-delivered-to-the-app-on-ios-11

@keitaoouchi I don't believe this is the reason for not receiving the notifications. They say this issue mentioned in StackOverflow is already fixed. Even if it is not - I experience a different issue - I always receive the push notifications when targeting a single device and very rarely receive notifications when sending to a User Segment.

I'm also encountering the issue of @o15a3d4l11s2. I can receive push notifications by sending message to a single device, but almost nothing when using User Segment.

I wasn't receiving any notifications until I deleted the .p12 files from the firebase console and upload the .p8 file https://stackoverflow.com/questions/39672297/how-to-use-apples-new-p8-certificate-for-apns-in-firebase-console

@eduardoParadoja Thanks for the succession. I use APN Auth Key and not APN Push Certificate.

I am seeing the exact same issue as @o15a3d4l11s2.
We are using the console (https://console.firebase.google.com) to send notifications. If I target an individual device using the FCM token the notification is received. If I try to send to a User Segment the notification is not received. :shrug:

We have the latests versions of the SDK installed. (Firebase 4.3.0 , FirebaseAnalytics 4.0.4, FirebaseCore 4.0.8, FirebaseInstanceID 2.0.4, FirebaseMessaging 2.0.4)
We are using the APN Auth Key .p8
We are calling UIApplication.shared.registerForRemoteNotifications() on app start in didFinishLaunchingWithOptions and before FirebaseApp.configure()

Exact the same issue as @jacobmoncur. Even same versions of Firebase, .p8, Xcode 9

Same issue as @jacobmoncur's. We need to ask user give permission to push notification after FirebaseApp configuration.

How do I use this solution?    fix is pod 'FirebaseInstanceID', "2.0.0"
HELP, PLEASE.

@ericklarac You add it on your Podfile

Pods:
pod 'Firebase/Core', '4.0.4'
pod 'Firebase/Database', '4.0.4'
pod 'Firebase/Messaging', '4.0.4'
pod 'FirebaseInstanceID', '2.0.0'
Getting
2017-10-11 00:45:28.181 Customer Connect[1964]  [Firebase/Messaging][I-FCM002019] FIRMessaging received data-message, but FIRMessagingDelegate's-messaging:didReceiveMessage: not implemented
Any suggestions?

@dhorrock You need to subscribe to the FIRMessagingDelegate and add the missing delegate method; see sample code in the AppDelegate.m of the MessagingExample project for your language of choice.

Hi all am also facing same problem ,but am not installed plugin coco pod on ios ,installed only "cordova-plugin-fcm" and done FCM setting its working all IOS Expect 11. am able to get token id also, sending notification  through API getting successful responses also ,but notification not coming IOS 11 but 10 its coming

Can not get it to work  either same problem with @o15a3d4l11s2.

@kerimsari @raghuyt @dhorrock
What I did was:

I opened terminal on the folder of the project, deleted the Podfile.lock.

Then exec pod install, with the following pods on Podfile:

pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'FirebaseInstanceID', "2.0.0"

Then I reviewed the certificates.

Run the project.

Note: If you are facing problems and you don't find a solution, I recommend you to start a new project and review each step. You can use the quickstart-ios example of firebase or this example which I found it awesome.

Hi @ericklarac
How can i install this for cordova apps
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'FirebaseInstanceID', "2.0.0"
Please can you help me with this .

Hi @ericklarac
I've done what you said and i can send notifications via topic target but not to user segment..
Please suggest

@raghuyt  Open up Terminal on the folder of the project then edit the Podfile, you can use nano or vi  and just paste those lines (i.e. mine looks like this):

Then you save it and run the command: pod install, open the .xcworkspace with Xcode, run the project and you are done.
@kerimsari  If the notifications status on the firebase consoles is completed, click the notification and look the chart if sent is 0 it's because firebase isn't storing the tokens. Actually, I don't know how user segment works on the firebase console at all, but hope I could work.

@ericklarac  thank you now its working in all IOS versions ,till now IOS version 11.0.2 its working all devices
what i made changes is this
updated our cordova to new version and platform IOS to new version

I had the same problem on my phone and solved it by restarting the phone, I was receiving the push after that. I hope it Wille be the same for you.

Firebase released a new update, anybody tested the new one?

I have a problem don't receive push notification on my some devices.
Environment:

Xcode9
Swift4

Devices:
iPhone6S Plus　(9.3.2)
iPhone5S　(10.3.2)
iPad Pro　(10.2.1)
iPhone7 Plus　(10.2.1)
In my Podfile.lock:
  - Firebase/Core (4.3.0):
  - Firebase/Messaging (4.3.0):
    - FirebaseMessaging (= 2.0.4)
  - FirebaseInstanceID (2.0.4)

Did v4.0.4~ really fix push problem??

Are you uploading the apple certificates (.p12 files) to firebase?

@shihochan It may be useful to create a new issue since this one is closed. There are different ways in which messages should be handled between iOS 9 and 10 so that could be an issue but a new issue with more detail of your setup and how you are sending the message would be helpful.

Agree with @kroikie Looks like this thread has been involved with many off-topic issues. If your issue is different than what's on the title (that's been closed), please file a new issue and we will look into each individual one. Thanks!


CSI driver can't read credentials from file

The CIS Kubernetes Benchmark recommends using secrets as files rather than environment variables. Currently, the only supported method for passing credentials to the CSI driver is via the IBMCLOUD_API_KEY environment variable.
To ensure compliance with the CIS Benchmark and to avoid being flagged by automated tools such as the OpenShift Compliance Operator, the CSI driver should also support reading credentials from a file.

cc @GunaKKIBM.

Raised a PR for this - https://github.com/kubernetes-sigs/ibm-powervs-block-csi-driver/pull/746
Note: As of now, this PR is only meant for reading credentials from file, rather than getting it from ENV.
With this approach(or even if it is reading from env), the disadvantage is that, whenever there is an apikey update, the controller/node server pod needs to be restarted to pick up the new apikey. Changes to make it dynamic can be done by means of a watcher, or may be reading apikey for every call to IAAS.
@yussufsh , please share your thoughts.

Sharing test results with changes in https://github.com/kubernetes-sigs/ibm-powervs-block-csi-driver/pull/746
Test case 1:  Secret mounted into container and API_KEY_PATH is specified
% kubectl apply -f specs
persistentvolumeclaim/powervs-claim created
pod/app created
storageclass.storage.k8s.io/powervs-sc created
% kubectl get pvc
NAME            STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   VOLUMEATTRIBUTESCLASS   AGE
powervs-claim   Bound    pvc-d1b41101-aad5-49ad-bb17-4e7287f4967b   4Gi        RWO            powervs-sc     <unset>                 50s
% kubectl get pods
NAME   READY   STATUS              RESTARTS   AGE
app    0/1     ContainerCreating   0          53s
% kubectl get pods
NAME   READY   STATUS    RESTARTS   AGE
app    1/1     Running   0          103s

Test case 2: API_KEY_PATH is specified but secret is not mounted (controller server fails)
Error seen in logs
F0924 07:57:55.132313       1 controller.go:134] Failed to get powervs cloud: error reading apikey: open /etc/secrets/IBMCLOUD_API_KEY: no such file or directory

Test case 3: API_KEY is specified as only env (secret is not mounted into the container)
W0924 08:05:46.831037       1 powervs.go:281] API_KEY_PATH is undefined
I0924 08:05:46.831044       1 powervs.go:269] Falling back to read IBMCLOUD_API_KEY environment variable for the key

% kubectl apply -f specs
persistentvolumeclaim/powervs-claim created
pod/app created
storageclass.storage.k8s.io/powervs-sc unchanged

% kubectl get pods
NAME   READY   STATUS    RESTARTS   AGE
app    1/1     Running   0          2m40s
% kubectl get pvc
NAME            STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   VOLUMEATTRIBUTESCLASS   AGE
powervs-claim   Bound    pvc-4734800e-0af4-479d-ba5f-ff28aa45599f   4Gi        RWO            powervs-sc     <unset>                 2m48s

This is completed.


[T5A2][F09-B1]Guo Shimin

You forgot to change the code in Logic class and also don't forget to change the header comment.
Some comments added. Please close the PR after reading comments.


Remove beta label

Tiny one-liner to remove the beta label to prevent confusion with actual betas.

 [uploader] Remove "beta" from Production Uploader


Varargs appear as an array without ... in typescript output

Given a jsinterop-exported method that uses varargs
public void create(String... strings) {
}

Expected ts output:
create(...strings:string[]):void;

Actual output:
create(strings:string[]):void;

Like Java, Typescript only supports this in the final position. Without the ... token, ts will expect that the argument is an array, instead of varargs.

See also https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters#the_difference_between_rest_parameters_and_the_arguments_object


Is it available to use only typings?

Hello, guys! Thanks for this beautiful tool. It works perfectly as expected.
Is there any opportunity to use only typing-generator feature? For example, I want to write HTTP requester by my own, but I want to use types generated by swagger schema.
What do you think? What is the best way to do it?

This is would actually really helpful to me as well. @kjayasa are you OK with this?


counter does not work on iPhone

Bug Report or Feature Request (mark with an x)
- [X] bug report -> please search issues before submitting
- [ ] feature request

Versions.
browser: Mobile Safari
browser version: unknown
operating system: iOS 11.3.1

Repro steps.

clone, install, run
access system on local network (computername:3000) from iPhone
site comes up, everything fine
go to counter page
press increment and decrement buttons
number does not change

hey @tvogt,
did you already figure out why it's not working? If it's critical for you that it works right now, I recommend using ngrok.
That's much better for your use case 👍

@tvogt forget about the ngrok thing. the problem is that you have a different URL than the baseUrl in the file ./src/app/config/default.json. That leads to a CORS violation.
you have two options:

implement CORS in the express app (guess I wouldn't do this)
change the base URL (much easier)

I hope that helps :-)

yeah, it's not important. Just thought the demo app should have simple things working, or people implementing more complicated logic based on it will hit that wall and wonder why.

@tvogt I thought about it yesterday and I think we can discuss a better solution. I work always with microservices, that means I don't use the express app as an API.
The issue is that we need a hardcoded URL for the XHR requests because relative paths don't work on the server-side.
If you have an idea how it should work by default, let me know. But I guess this issue is tightly coupled to your overall architecture in the project.

I would be happy if you can create a PR for that. I thought that CORS is something every web-developer knows about. I will rethink the use-case I want to cover with the HttpService and try to come up with a generic solution or documentation

I added a new section to the docs where I describe how to set up the architecture for the vue-starter, anything else will not be covered by our support. https://vue-starter.herokuapp.com/docs/introduction.html#recommended-architecture


Translate caption/description

What is the user problem or growth opportunity you want to see solved?
I often see captions (or descriptions) in languages I can not read.
How do you know that this problem exists today? Why is this important?
It happens a lot.
Users who use Explore to find a picture of sugar (for instance) would probably like to understand the caption/description so that they can be sure the picture really shows sugar, not salt or something else.
Who will benefit from it?
Users of Explore
Anything else you would like to add?
From a license point of view, we can not include any closed-source translation library.
From a privacy point of view, we should not call translation web APIs. I guess that excludes Android-side integration with local translation apps, since those typically call their web service (even in the case of offline translation I guess they gather usage data and send it when online). Calling a third-party service via a proxy service running on our Wikimedia-owned server would be OK, I guess.
It has to be gratis.

@nicolas-raoul  Can I work on this issue?

I think I can try to solve the problem, could you assign the issue to me


Parameter --exclude to exclude utters and actions from E2E test coverage

Is there an existing idea for this?
Please search 🔍 the ideas to check if this idea has already been reported.

[x] I have searched the existing ideas.

Is your feature request related to a problem? Please describe.
I have a project that has utters in actions imported from external modules. These utters aren't covered by E2E test coverage, even though there is E2E test for these actions.
Describe the solution you'd like (optional)
Create a parameter named --exclude that accepts a list of utters and actions to exclude from E2E test coverage.

Issue resolved in PR #79.


MaxListenersExceededWarning

I'm getting this error when trying to use this node: (node:5033) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [VBANServer]. Use emitter.setMaxListeners() to increase limit

Hello,
This is just a warning, that telling that too much (for the configured leak detector) "nodes" listen to the VBAN server .
I already disable it on my side, so I'm releasing a little update with it :) .


Implement a simple 'app delegate'

This is an experiment for one possible way to allow more top-level customization. This is motivated by the fact that there's currently no way to modify menus or create and close windows without implementing a custom widget.
The basic idea is to introduce an AppDelegate struct, which if used will be called at various points and allowed to handle events and modify state. Initially there is only one customization point, which is the ability to intercept and modify events before they're passed to the rest of the tree.
I can imagine this expanding over time; in particular I think that the app delegate should probably have access to all window state, and might even be the place to implement things like opening and saving files.
This is just a sketch; I'm going to try and use this in Runebender shortly, but I wanted to open a PR for discussion.

I've been using this in runebender and I quite like it; in particular it's a nice solid place to put window management code. It's a new pattern, so deserves scrutiny, but I propose merging this.


Automated script for local testing

The script would open 2 browser windows (or use 2 existing browser windows), load RPS, and navigate through virtual funding and then through conclusion.

@andrewgordstewart If I remember correctly, you mentioning that we used to have an AppleScript executable for this.

I think the work in #802 offers a solution to this. @kerzhner you could re-open this issue if it does not satisfactorily do so.

I recorded a script with the Script Editor app. It generated AppleScript for me. I edited the timing, and exported it as a .app.
I think using puppeteer or something like that would be a better solution, as mine was quite brittle. (It was hacked together as a time saver.)


iteritems deprecation warning on merge_seqs

Related to #290
In qiime2-amplicon-2024.2 I get a similar warning with merge_seqs:
>>> silva_extended_seqs, = merge_seqs([v34_organelle_seqs, v34_silva_seqs])
/.../.conda/envs/qiime2-juypterlab_env/lib/python3.8/site-packages/q2_types/feature_data/_transformer.py:258: FutureWarning: iteritems is deprecated and will be removed in a future version. Use .items instead.
  for id_, seq in data.iteritems():

Cheers

looks like this was fixed in #323


Goal: Make it possible to display code guides that change as you scroll

Some code guides on the internet change the example code as you scroll, e.g., LiveView Native: https://liveviewnative.github.io/liveview-client-swiftui/tutorials/phoenixliveviewnative/03-navigation-and-hero
I think their guide behavior is based on Apple's.
We should make it easy to achieve this effect with Inception.
CC @domesticmouse

Do you want to capture what you are seeing somehow? When I click on that link I'm not seeing anything out of the ordinary.
But it might be due to the fact I'm viewing it on an iPhone?

Sure. Here's a video. I guess it's really nothing more than switching code based on scroll offset. I would find an Apple example if I remembered where they live. I bet those are bit more polished.
I'm also imagining the ability to fade between them. Or what would really be cool is if each line flew in/out and animated to its next position.
https://user-images.githubusercontent.com/7259036/198873359-422e44b1-6093-4965-9b2b-33f6674e5366.mov


Keep getting and error!

Not sure what I'm doing wrong but I keep getting an error:
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)] on win32
File "E:\RoundCorners 05 8.py", line 75, in
RADIUS = Point(30,30)
NameError: name 'Point' is not defined
its on running on WinXP
thanks

I have no idea whats going on.... sorry


JavaScript setup for Anniversary Challenge

Language
JavaScript
Challenge
First Anniversary Challenge

This only has tests for parts 1 and 2 right now. Wanted to get this up in case people want to start this now.


Getting years with applicable seasons

A few requests are suddenly returning no response, whereas they used to.
examples i found:
-https://api.jikan.moe/v3/season/archive
-https://api.jikan.moe/v3/top/anime/1/airing
-https://api.jikan.moe/v3/top/anime/1/upcoming
I just noticed because my project i made with your api wasn't working right today when I looked at it then I tested the requests and got no response.

We had issued a notice on our discord #status channel but a bit late response here;
MAL was returning blank pages sporadically for a day or two. Which resulted in Jikan not being able to parse the data appropriately and instead just returned an empty array.
This was resolved automatically by MAL a few days after the incident.
All good now!

We had issued a notice on our discord #status channel but a bit late response here;
MAL was returning blank pages sporadically for a day or two. Which resulted in Jikan not being able to parse the data appropriately and instead just returned an empty array.
This was resolved automatically by MAL a few days after the incident.
All good now!


update horizon scripts since the scripts are now one level deeper

also moved LICENSE.txt to services/horizon

There should just be one LICENSE.txt for the whole repo. We don't need one  special for horizon now

ok, removing it in a separate PR.


Bad credentials file causes Pub/Sub topic creation to hang

Steps to reproduce:

Create and download a GCP service account key (JSON file).
Make sure the key is actually deleted in the Cloud Console so that it's invalid.
Modify application.properties in spring-cloud-gcp-pubsub-sample to have spring.cloud.gcp.credentials.location point to the download key file.
Run the application and try to create a new topic using the web UI.

Observe that the application just hangs with no error messages.

This repeats over and over in the logs when running an Integration test after the key has been deleted:
15:28:04.944 [grpc-default-worker-ELG-1-6] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.SslHandler - [id: 0x464293d0, L:/<IP_ADDRESS>:50735 - R:spanner.googleapis.com/<IP_ADDRESS>:443] HANDSHAKEN: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
15:28:04.944 [grpc-default-worker-ELG-1-6] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x464293d0, L:/<IP_ADDRESS>:50735 - R:spanner.googleapis.com/<IP_ADDRESS>:443] OUTBOUND SETTINGS: ack=false settings={ENABLE_PUSH=0, MAX_CONCURRENT_STREAMS=0, INITIAL_WINDOW_SIZE=1048576, MAX_HEADER_LIST_SIZE=32768}
15:28:04.944 [grpc-default-worker-ELG-1-6] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x464293d0, L:/<IP_ADDRESS>:50735 - R:spanner.googleapis.com/<IP_ADDRESS>:443] OUTBOUND WINDOW_UPDATE: streamId=0 windowSizeIncrement=983041
15:28:04.946 [grpc-default-worker-ELG-1-6] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x464293d0, L:/<IP_ADDRESS>:50735 - R:spanner.googleapis.com/<IP_ADDRESS>:443] INBOUND SETTINGS: ack=false settings={MAX_CONCURRENT_STREAMS=100, INITIAL_WINDOW_SIZE=1048576, MAX_HEADER_LIST_SIZE=16384}
15:28:04.946 [grpc-default-worker-ELG-1-6] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x464293d0, L:/<IP_ADDRESS>:50735 - R:spanner.googleapis.com/<IP_ADDRESS>:443] OUTBOUND SETTINGS: ack=true
15:28:04.946 [grpc-default-worker-ELG-1-6] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x464293d0, L:/<IP_ADDRESS>:50735 - R:spanner.googleapis.com/<IP_ADDRESS>:443] INBOUND WINDOW_UPDATE: streamId=0 windowSizeIncrement=983041
15:28:05.011 [grpc-default-worker-ELG-1-6] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x464293d0, L:/<IP_ADDRESS>:50735 - R:spanner.googleapis.com/<IP_ADDRESS>:443] INBOUND SETTINGS: ack=true
15:32:04.945 [grpc-default-worker-ELG-1-6] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x464293d0, L:/<IP_ADDRESS>:50735 - R:spanner.googleapis.com/<IP_ADDRESS>:443] INBOUND GO_AWAY: lastStreamId=0 errorCode=0 length=17 bytes=73657373696f6e5f74696d65645f6f7574

Thanks @jlheard! We're waiting for the fix in the client library.
See: https://github.com/GoogleCloudPlatform/google-cloud-java/issues/3573.

Just tried running this; this appears to still be an issue.

They still need to fix it in https://github.com/googleapis/google-cloud-java/issues/3573.

Underlying issue seems to have been fixed?

It looks like it's fixed, but we should probably re-run the test to confirm before closing.

Hmm I don't think they ended up changing anything. The recommendation they provided in the comment https://github.com/googleapis/google-cloud-java/issues/3573#issuecomment-578985763 suggested that we could modify our RPC timeout setting for our topicAdminClient to 30 seconds instead of 10 minutes tho which would eventually allow it to return if the credentials file is invalid.
Is this something we should do?

Do we expose this as a configuration property?

No, but it is a bean the user can override: https://github.com/spring-cloud/spring-cloud-gcp/blob/master/spring-cloud-gcp-autoconfigure/src/main/java/org/springframework/cloud/gcp/autoconfigure/pubsub/GcpPubSubAutoConfiguration.java#L351
Still tho it doesn't feel quite right to ask the user to override the setting just so they'll time out quicker if they accidentally use an incorrect auth config since the user will most likely encounter the issue before they learn about the setting.

Let me dig into the client library code, see if there is something we could change to deal with this better. Otherwise I would recommend maybe setting the timeout from 10 mins to 1 minute for topic admin?

Can we pre-check if the key is valid? Or will it require resourcemanager permissions or something...

Posted question in GRPC; hopefully can get a reaction there: https://github.com/grpc/grpc-java/issues/6808


Doesn't work with pipewire

Not exactly sure what the issue is with pipewire; initial device enumeration here works but later down the line they all get rejected.

Briefly looking at source, i guess the problem is here:
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/spa/plugins/alsa/alsa-udev.c#L144
Try to remove that check.

that doesn't change much unfortunately however looking back at the initial enumerate function it produces different results with actual udev and udev-zero. I extracted the following example code:
#include <stdio.h>
#include <libudev.h>

int main() {
	struct udev *udev = udev_new();
	struct udev_enumerate *enumerate = udev_enumerate_new(udev);

	enumerate = udev_enumerate_new(udev);

	udev_enumerate_add_match_subsystem(enumerate, "sound");
	udev_enumerate_scan_devices(enumerate);

	for (struct udev_list_entry *devices = udev_enumerate_get_list_entry(enumerate); devices;
		devices = udev_list_entry_get_next(devices)) {
		puts(udev_list_entry_get_name(devices));

		struct udev_device *dev = udev_device_new_from_syspath(udev, udev_list_entry_get_name(devices));

		udev_device_unref(dev);

	}
	udev_enumerate_unref(enumerate);
}

an I ran with ./a.out | sort
with udev i get the following
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/controlC1
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/hwC1D0
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/pcmC1D3p
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/pcmC1D7p
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/pcmC1D8p
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/pcmC1D9p
/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/sound/card2
/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/sound/card2/controlC2
/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/sound/card2/pcmC2D0p
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/controlC0
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/hwC0D0
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/hwC0D2
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D0c
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D0p
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D10p
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D3p
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D7p
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D8p
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D9p
/sys/devices/virtual/sound/seq
/sys/devices/virtual/sound/timer

with libudev-zero i get
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/controlC1
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/hwC1D0
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/pcmC1D3p
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/pcmC1D7p
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/pcmC1D8p
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/pcmC1D9p
/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/sound/card2/controlC2
/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/sound/card2/pcmC2D0p
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/controlC0
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/hwC0D0
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/hwC0D2
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D0c
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D0p
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D10p
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D3p
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D7p
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D8p
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D9p
/sys/devices/virtual/sound/seq
/sys/devices/virtual/sound/timer

libudev-zero seems not to be including the following which is what pipewire is looking for:
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1
/sys/devices/pci0000:00/0000:00:1f.3/sound/card0

Quick workaround(or real fix???)
diff --git a/spa/plugins/alsa/alsa-udev.c b/spa/plugins/alsa/alsa-udev.c
index e7a9e8c8..d4c81448 100644
--- a/spa/plugins/alsa/alsa-udev.c
+++ b/spa/plugins/alsa/alsa-udev.c
@@ -141,9 +141,6 @@ static uint32_t get_card_id(struct impl *this, struct udev_device *dev)
 	if ((str = udev_device_get_property_value(dev, "SOUND_CLASS")) && spa_streq(str, "modem"))
 		return SPA_ID_INVALID;

-	if ((str = udev_device_get_property_value(dev, "SOUND_INITIALIZED")) == NULL)
-		return SPA_ID_INVALID;
-
 	if ((str = udev_device_get_property_value(dev, "DEVPATH")) == NULL)
 		return SPA_ID_INVALID;

@@ -618,7 +615,7 @@ static int enum_devices(struct impl *this)

 	for (devices = udev_enumerate_get_list_entry(enumerate); devices;
 			devices = udev_list_entry_get_next(devices)) {
-		struct udev_device *dev;
+		struct udev_device *dev, *pdev;

 		dev = udev_device_new_from_syspath(this->udev, udev_list_entry_get_name(devices));
 		if (dev == NULL)
@@ -626,6 +623,13 @@ static int enum_devices(struct impl *this)

 		process_device(this, ACTION_ADD, dev);

+		pdev = udev_device_get_parent(dev)
+		if (pdev) {
+		    process_device(this, ACTION_ADD, pdev);
+		}
+
+		/* no need to call udev_device_unref(pdev) here.
+		   udev_device_unref() will free parent device implicitly */
 		udev_device_unref(dev);
 	}
 	udev_enumerate_unref(enumerate);

This was successful in discovering devices (tested with spa-monitor /usr/lib/spa-0.2/alsa/libspa-alsa.so) weirdly pipewire is still not working but I think that's an issue with musl :confused:

By the way, pipewire can be compiled without udev support -> https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/meson_options.txt#L168-171

Unfortunately this option isn't respect by the build system and it tries to build stuff requiring udev anyway.

Just a heads-up, the ((str = ...)) asssignment was rewritten and broke the patch mentioned in this repo.
I'm currently using a slightly modified version of the patch for newer versions of Pipewire:
diff --git a/spa/plugins/alsa/alsa-udev.c b/spa/plugins/alsa/alsa-udev.c
index e7a9e8c8..d4c81448 100644
--- a/spa/plugins/alsa/alsa-udev.c
+++ b/spa/plugins/alsa/alsa-udev.c
@@ -141,9 +141,6 @@ static uint32_t get_card_id(struct impl *this, struct udev_device *dev)
 	if ((str = udev_device_get_property_value(dev, "SOUND_CLASS")) && spa_streq(str, "modem"))
 		return SPA_ID_INVALID;

-	if (udev_device_get_property_value(dev, "SOUND_INITIALIZED") == NULL)
-		return SPA_ID_INVALID;
-
 	if ((str = udev_device_get_property_value(dev, "DEVPATH")) == NULL)
 		return SPA_ID_INVALID;

@@ -618,7 +615,7 @@ static int enum_devices(struct impl *this)

 	for (devices = udev_enumerate_get_list_entry(enumerate); devices;
 			devices = udev_list_entry_get_next(devices)) {
-		struct udev_device *dev;
+		struct udev_device *dev, *pdev;

 		dev = udev_device_new_from_syspath(this->udev, udev_list_entry_get_name(devices));
 		if (dev == NULL)
@@ -626,6 +623,13 @@ static int enum_devices(struct impl *this)

 		process_device(this, ACTION_ADD, dev);

+		pdev = udev_device_get_parent(dev);
+		if (pdev) {
+		    process_device(this, ACTION_ADD, pdev);
+		}
+
+		/* no need to call udev_device_unref(pdev) here.
+		   udev_device_unref() will free parent device implicitly */
 		udev_device_unref(dev);
 	}
 	udev_enumerate_unref(enumerate);

@illiliti @capezotte is there any reason this patch hasn't been sent to upstream?
I just tried out libudev-zero on Alpine Linux for the 1st time, and apparently pipewire doesn't like to work (I can't see any sinks / sources). The original work around https://github.com/illiliti/libudev-zero/commit/4510b27a9b589a0ce82fef776c2648e19e79f2a4 doesn't seem to have any effects anymore.
I'm running pipewire version 0.3.51 (with pipewire-pulse and pipewire-jack) and libudev-zero version 1.0.1

Yeah, getting this patch upstream is probably worth the effort, but personally i'm not going to do that because

I don't use pipewire, i can't test it.
 I know it's a bit too early to say that, but it's highly likely that pipewire would just reject this patch due to its specificity to libudev-zero.
I can't guarantee that they won't break libudev-zero again. Constant fighting with upstream regarding udev stuff is a last thing i want to do.

Anyway, feel free to take the flag and submit this patch to pipewire.

I have a similar setup – Gentoo with musl, libudev-zero git master, systemwide PipeWire 0.3.51 (with my version of the patch) replacing Jack and Pulse – and audio works.
Removing that check seems very likely to break something for the majority using udev, so I haven't considered upstreaming it.

Maybe I should ask upstream once, so they at least know about the patch and that we 'ugly ones' exist :v:

Issue sent to upstream: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2398

Version 1.0 came around and renamed some functions and variables, breaking the patch.
Patch v3:
diff --git a/spa/plugins/alsa/alsa-udev.c b/spa/plugins/alsa/alsa-udev.c
index 58ff5032d..b0b7a945d 100644
--- a/spa/plugins/alsa/alsa-udev.c
+++ b/spa/plugins/alsa/alsa-udev.c
@@ -162,8 +162,6 @@ static unsigned int get_card_nr(struct impl *this, struct udev_device *udev_devi
 	if ((str = udev_device_get_property_value(udev_device, "SOUND_CLASS")) && spa_streq(str, "modem"))
 		return SPA_ID_INVALID;

-	if (udev_device_get_property_value(udev_device, "SOUND_INITIALIZED") == NULL)
-		return SPA_ID_INVALID;

 	if ((str = udev_device_get_property_value(udev_device, "DEVPATH")) == NULL)
 		return SPA_ID_INVALID;
@@ -982,7 +982,7 @@ static int enum_cards(struct impl *this)

 	for (udev_devices = udev_enumerate_get_list_entry(enumerate); udev_devices;
 			udev_devices = udev_list_entry_get_next(udev_devices)) {
-		struct udev_device *udev_device;
+		struct udev_device *udev_device, *pdev;

 		udev_device = udev_device_new_from_syspath(this->udev,
 		                                           udev_list_entry_get_name(udev_devices));
@@ -991,6 +991,8 @@ static int enum_cards(struct impl *this)

 		process_card(this, ACTION_ADD, udev_device);

+		if ((pdev = udev_device_get_parent(udev_device)))
+			process_card(this, ACTION_ADD, pdev);
 		udev_device_unref(udev_device);
 	}
 	udev_enumerate_unref(enumerate);

@illiliti Given that you have a Gitlab account (I don't), could you make a PR in the pipewire repo instead of an issue? There are around 780~ open issues, and I think that's why no core developer has looked at the proposed patch, however, there are only 27 open PRs at the time of writing, so I think it'd make sense to open a PR instead. Thanks
:)

They did look into the issue; however, they'd rather the SOUND_INITIALIZED property got implemented in libudev-zero, since ignoring it causes race conditions when hotplugging complex sound cards.
I tried writing a patch doing just that for this project but I don't have enough C skills to make a implementation of it that doesn't segfault.

Hmm. Maybe the correct solution is packaging a separate pipewire for us Alpine users that do have libudev-zero in our repos. Happens that I don't like the build system that Alpine uses, its crappy, slow, and relies on custom templates that work like shell scripts but worse.

(correct solution for now... Obviously libeudev-zero should implement that if we hope to replace udev and have working systems).

(they are just shell scripts)

@illiliti Couldn't we implement this using XDG_RUNTIME_DIR if it is present or an alternative dir to implement this logic? Since it requires saving data.

@xplshn @folliehiyuki can you try the PR I just sent?
Tested on:

Gentoo with musl
libudev-zero git master + #69
Pipewire 1.0.4

This patch doesn't work anymore, need to be updated

ACTION_ADD needs to be replaced with ACTION_CHANGE and process_card with process_udev_device and it works again.
diff --git a/spa/plugins/alsa/alsa-udev.c b/spa/plugins/alsa/alsa-udev.c
index 9420401f0..4e0f751cf 100644
--- a/spa/plugins/alsa/alsa-udev.c
+++ b/spa/plugins/alsa/alsa-udev.c
@@ -164,9 +164,6 @@ static unsigned int get_card_nr(struct impl *this, struct udev_device *udev_devi
 	if ((str = udev_device_get_property_value(udev_device, "SOUND_CLASS")) && spa_streq(str, "modem"))
 		return SPA_ID_INVALID;

-	if (udev_device_get_property_value(udev_device, "SOUND_INITIALIZED") == NULL)
-		return SPA_ID_INVALID;
-
 	if ((str = udev_device_get_property_value(udev_device, "DEVPATH")) == NULL)
 		return SPA_ID_INVALID;

@@ -970,7 +967,7 @@ static int enum_cards(struct impl *this)

 	for (udev_devices = udev_enumerate_get_list_entry(enumerate); udev_devices;
 			udev_devices = udev_list_entry_get_next(udev_devices)) {
-		struct udev_device *udev_device;
+		struct udev_device *udev_device, *udev_parent_device;

 		udev_device = udev_device_new_from_syspath(this->udev,
 		                                           udev_list_entry_get_name(udev_devices));
@@ -979,6 +976,13 @@ static int enum_cards(struct impl *this)

 		process_udev_device(this, ACTION_CHANGE, udev_device);

+		udev_parent_device = udev_device_get_parent(udev_device);
+		if (udev_parent_device) {
+			process_udev_device(this, ACTION_CHANGE, udev_parent_device);
+		}
+
+		/* no need to call udev_device_unref(udev_parent_device) here.
+		   udev_device_unref() will free parent device implicitly */
 		udev_device_unref(udev_device);
 	}
 	udev_enumerate_unref(enumerate);

Will try my best to keep this patch updated.

@gordon-quad i tried the patch with 1.2.0 and get this
`patching file spa/plugins/alsa/alsa-udev.c
Hunk 2 FAILED 915/912.
start_inotify(this);

if (spa_streq(action, "change")) {

if (spa_streq(action, "change") || spa_streq(action, "add")) {
process_card(this, ACTION_ADD, udev_device);
} else if (spa_streq(action, "remove")) {
process_card(this, ACTION_REMOVE, udev_device);`

@asimovc can you double-check what are you patching with? I don't see any mentions of the hunk you presented nor the line number in my patch...
I used git to format my patch, but double-checked with sources downloaded as a tarball and it applied successfully
$ wget -qc https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/1.2.0/pipewire-1.2.0.tar.bz2
$ tar -xpf pipewire-1.2.0.tar.bz2
$ cd pipewire-1.2.0
$ cat /tmp/pipewire-udev.patch | patch --verbose -p1
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/spa/plugins/alsa/alsa-udev.c b/spa/plugins/alsa/alsa-udev.c
|index 9420401f0..4e0f751cf 100644
|--- a/spa/plugins/alsa/alsa-udev.c
|+++ b/spa/plugins/alsa/alsa-udev.c
--------------------------
patching file spa/plugins/alsa/alsa-udev.c
Using Plan A...
Hunk #1 succeeded at 164.
Hunk #2 succeeded at 967.
Hunk #3 succeeded at 976.
done

I revised and now worked, my fault. Thanks bro


:nokotlin:

:nokotlin: on top

@w0rl3x well do it yourself then

🗿

Off topic.

Why is this still an open issue ?


Convert mesh-extras to TypeScript

Description of change

Pre-Merge Checklist

Simple enough conversion.
Fixes a few types in Mesh and made data optional in Buffer.update

[x] Lint process passed (npm run lint)
[x] Tests passed (npm run test)

Codecov Report

Merging #6396 into dev will increase coverage by 1.49%.
The diff coverage is 71.42%.

@@            Coverage Diff             @@
##              dev    #6396      +/-   ##
==========================================
+ Coverage   78.37%   79.86%   +1.49%
==========================================
  Files          64       61       -3
  Lines        3759     3502     -257
==========================================
- Hits         2946     2797     -149
+ Misses        813      705     -108

Impacted Files
Coverage Δ

...s/canvas/canvas-sprite/src/CanvasSpriteRenderer.js
65.51% <100%> (ø)
:arrow_up:

packages/canvas/canvas-renderer/src/BaseTexture.js
100% <100%> (ø)
:arrow_up:

packages/canvas/canvas-mesh/src/NineSlicePlane.js
89.36% <50%> (-1.75%)
:arrow_down:

...nvas/canvas-graphics/src/CanvasGraphicsRenderer.js
35.51% <70%> (+1.81%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c338451...bfd3353. Read the comment docs.


Unable to pass 2 different zone_ids (private and public) in a single module call

Description
Please provide a clear and concise description of the issue you are encountering, and a reproduction of your configuration (see the examples/* directory for references that you can copy+paste and tailor to match your configs if you are unable to copy your exact configuration). The reproduction MUST be executable by running terraform init && terraform apply without any further changes.
If your request is for a new feature, please use the Feature request template.

[ yes] ✋ I have searched the open/closed issues and my issue is not listed.

⚠ Note
Before you submit an issue, please perform the following first:

Remove the local .terraform directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!): rm -rf .terraform/
Re-initialize the project root to pull down modules: terraform init
Re-attempt your terraform plan or apply and check if the issue still persists

Versions

Module version [Required]:

Terraform version:
Terraform v1.1.9

Provider version(s):
Terraform v1.1.9
on linux_amd64 + provider registry.terraform.io/hashicorp/aws v4.25.0

Reproduction Code [Required]
module "records" {
  source  = "terraform-aws-modules/route53/aws//modules/records"
  version = "~> 2.0"

  zone_id = "<zone-id-1>"

  records = [
    {
      name    = "example-test-1"
      type    = "CNAME"
      ttl     = 3600
      records = [
        "<IP_ADDRESS>",
      ]
    }
  ]

  zone_id = "<zone-id-2>"
  private_zone = true

  records = [
    {
      name    = "example-test-1"
      type    = "CNAME"
      ttl     = 3600
      records = [
        "<IP_ADDRESS>",
      ]
    }
  ]
}

Steps to reproduce the behavior:
terraform apply

Expected behavior
There is a record name "example-test-1" and I want to create entry for it for 2 hosted zone, one is public and other is private.

Actual behavior
Unable to find a way to perform this.

Terminal Output Screenshot(s)

Additional context
I am not able to figure out how to provide 2 different zone_id(s) in the same module block, one with passing private_zone = true and other without it (public).

Hello @ashishjullia,
I don't think it is possible to create records for two different zones in the way you describe it.
More precisely, it is not possible to do it using only one time the module.
You should use the module one time per zone to use. In your example, your should use the module one time for the public zone and one time for the private zone. It should look something like this:
module "records_zone_public" {
  source  = "terraform-aws-modules/route53/aws//modules/records"
  version = "~> 2.0"

  zone_id = "<zone-id-1>"

  records = [
    {
      name    = "example-test-1"
      type    = "CNAME"
      ttl     = 3600
      records = [
        "<IP_ADDRESS>",
      ]
    }
  ]
}

module "records_zone_private" {
  source  = "terraform-aws-modules/route53/aws//modules/records"
  version = "~> 2.0"

  zone_id = "<zone-id-2>"
  private_zone = true

  records = [
    {
      name    = "example-test-1"
      type    = "CNAME"
      ttl     = 3600
      records = [
        "<IP_ADDRESS>",
      ]
    }
  ]
}

Yup, that's completely correct.
Thanks.
Closing.


[dy] Add Python 3.6 to unit tests

Summary

Tests

cc:

@wangxiaoyou1993 is this still relevant?


sqlite3.connect fails @ libschedulesdirect/cache.py line 13

Your described use case is exactly the same as mine.  Trying this I get
sqlite3.OperationalError: unable to open database file
Is there something I should be doing to set up the initial database?
The options don't include an option for the DB path just the output path.
Sorry if this is just an I don't know python question but that may be a lot of it.
Thanks for doing this, I've tried to make a perl add-on to run the xmltv projects dd_na grabber but the dependencies are out of control.

I'm working on a new version of sd2xmltv which is just about ready.  It supports the latest SchedulesDirect API 20141201.  It also supports basic lineup management.  I'll try to replicate your issue and push it to github within the next few days.
The sqlite database should automatically create itself though that's not a feature that I've tested in a long time.  There is also no lineup management in the current version meaning you must have already added lineups to your account.

Great!
I saw that there was no management so I setup my headend on the SD website.
Waiting pseudo calmly.☺
On May 25, 2015 16:22, "astrilchuk"<EMAIL_ADDRESS>wrote:

I'm working on a new version of sd2xmltv which is just about ready. It
supports the latest SchedulesDirect API 20141201. It also supports basic
lineup management. I'll try to replicate your issue and push it to github
within the next few days.
The sqlite database should automatically create itself though that's not a
feature that I've tested in a long time. There is also no lineup management
in the current version meaning you must have already added lineups to your
account.
—
Reply to this email directly or view it on GitHub
https://github.com/astrilchuk/sd2xmltv/issues/1#issuecomment-105333941.

I've merged and pushed the latest code to the master branch.  Please give it a try.  Once you have the xmltv.xml output file, you can socat it to tvheadend like so (adjust the path to xmltv.sock as needed):
cat xmltv.xml | sudo socat - unix-connect:/home/hts/.hts/tvheadend/epggrab/xmltv.sock
This could be added to a shell script and called as a cron job.

Hi
Thanks for the new version!
You have Canada hardcoded as the country, so I changed that.
It doesn't seem to be picking up my existing headend configuration, I'm wondering it that has something to do with the json vs soap servers. So I went ahead and used manage to add a lineup and tried again.
I'm getting a message:
Lineup responses updated. See http://forums.schedulesdirect.org/viewtopic.php?f=17&t=2645&p=8379 for details.
but I'm guessing you have seen this.
It's running, but slowly, this could be  because I'm testing on a RPi2 running off a SD card.  The CPU consumption isn't high but I have limited tools in the openelec image I'm currently using to see where the problem lies.  I did up the logging level to debug and the response from the server came back quickly and now it just seems to be loading the sdcache.db with the program information.
At the rate it's going it's going to take several hours to cache the ~9K shows that are in the full headend lineup.
I only watch the network OTA channels so it would be nice to be able to limit the data to those if that is possible.
Thanks again!

Hi,
Canada hardcoded?  Are there any other countries I should be including? ;-)  Hehe...I'll fix that so you can supply the country.
I think SchedulesDirect were planning on copying everyone's subscribed lineups from the old API (20140530) to the new API (20141201) on May 30th.  That's why you had to re-add them.
I wouldn't recommend running with the logging level set to DEBUG unless absolutely necessary.  That logging level outputs a huge amount of information and will slow down the process considerably.
Regarding limiting the channels - that was going to be my very next task :-).  If, in the mean time, you'd like to limit the channels, look in sd2xmltv.py around line 63.  You'll see a commented out self.callsign_whitelist = [...].  You can add the callsigns of only the channels you want there.
Once sdcache.db is initially populated, the subsequent runs should be much faster (don't forget to switch back to INFO logging level).
You could also supply a --days parameter on the command line to limit the number of schedule days it is loading.  You can start with --days 1, --days 2, then --days 3...etc to limit the amount of data it needs to initially cache.  I currently default to 14 days - though SchedulesDirect may supply more days than that on particular channels.
Any other suggestions you have would be greatly appreciated.  I'd like to post detailed instructions on how to setup sd2xmltv on the tvheadend forum so your feedback is very helpful.

I've heard there are one or two countries outside North America but you can't believe everything you read on the internet :-)
I was just upping the logging level to see what was going on, not planning on leaving it there.
I'll have a look at the white-listing.
The performance problems are definitely related to the db being on the sd card, changing the db to :memory: reduced the runtime to under 3 minutes user time and under 4 minutes real time for 66 channels and over 9K programs.  That does kind of defeat the purpose of the whole json api though.
So here are my suggestions:

Finish the white-listing implementation.
tighten up the user input parsing, I hit a couple of array out of bounds errors when I input an incorrect response.
Add a serialize/de-serialize to memory function to the table, I think this is an implementation http://stackoverflow.com/questions/3850022/python-sqlite3-load-existing-db-file-to-memory/10856450#10856450 but my python foo is weak. This will be important to the RPi users.
XMLTV compatibility, this could be a simple shell script like this:
http://forum.kodi.tv/showthread.php?tid=203011&pid=1783361#pid1783361
This would allow the user soft link the script as tv_grab_sd2xmltv into a directory in the path so TVH would present it in the epg/grabber configuration.  OpenElec doesn't have socat and it's nc is from busybox and I can't get it to work with TVH.

I have modified the way programs are inserted into the database.  They are now inserted as a batch (I thought that was how it was already working).  It should be much faster now - though still limited by the write speed on your sd card.  I've pushed the changes to github if you'd like to give it a try.
I run Openelec on a Raspberry Pi with Tvheadend running on a second Pi with Raspbian - though all of my development and testing is performed on a desktop.
I'm pretty sure I had nc working on openelec at one point.  I'll see if I can recall how I managed that.
Thanks for your feedback - I've added 1, 2, and 4 as github issues.  I'll try to get to them as soon as I can.

The white listing works great, just need a UI for the people who want an appliance.
The new insert strategy takes the run time down to ~= an in memory table so suggestion 3 isn't needed anymore.
I'm going to see about setting this up completely on OE 5.95.1/RPi 2 tonight, but my initial testing makes me think it will work well.  That means I will probably make the tv_grab script, if I get it working would you want a pull request?
Thanks for all the effort.

I would gladly take the tv_grab script pull request!
Thanks again for your input - much appreciated.

I put together a simple hardcoded one, I'll put together a better one this weekend.
All seems to be working, just seem to be having some stability problems with the tvh client and can't figure out how to schedule a series record from the client.

Regarding the series record, by 'client' are you referring to the tvheadend or kodi interface?

The kodi interface, the web interface for tvheadend has a record series
button but even it doesn't have new episodes only as an option.

Mike
On May 29, 2015 7:22 PM, "astrilchuk"<EMAIL_ADDRESS>wrote:

Regarding the series record, by 'client' are you referring to the
tvheadend or kodi interface?
—
Reply to this email directly or view it on GitHub
https://github.com/astrilchuk/sd2xmltv/issues/1#issuecomment-106976281.

The softlink in the TVH bin directory doesn't survive a reboot :-(
Looks like it will require that it's packaged as an add-on for kodi for complete integration.


Implement refresh token

https://gist.github.com/vuorinem/6b57225915e00920e3b1

I'm already working on an implementation of refresh tokens and I'd like to know which repo to create the  PR on when I'm done

@alfkonee That's up to you. I would prefer this one, as I'd otherwise have to port code from the other.
And good to know you're working on it! Someone else is also working on it, perhaps you can join the chat and talk? Would be good to have joined efforts I think.

Ok then this one it is
PS: already joined the chat if you could tell me who is already working on this it'll be great so that we can pool our efforts

I'm getting very close to finalizing the main code maybe in the next 36 hrs
Problems: Response interception in fetch client doesn't include request the feature is still in dev with this PR https://github.com/aurelia/fetch-client/pull/34
Hope they add it soon

Added the response Interceptor Feature to the #31 @RWOverdijk @doktordirk I think this makes it Ok for an initial release of this feature

implement with https://github.com/SpoonX/aurelia-authentication/pull/31

Congrats on the new feature!
However, the use of refresh tokens with an SPA (explicit flow), is insecure. It's not only insecure on the client side, it's also insecure on the server side (the authorization code is returned a query string and gets may get logged).
It's also against the RFC - https://tools.ietf.org/html/rfc6749#section-10.5 - and the whole reason why implicit flow was created in the first place.
Other than revocation of long-lived access tokens, reference tokens are one of the ways around this scenario.

i dont get it. what's about authorization codes? this is access tokens 10.3 and refresh tokens 10.4 here?!

You're obtaining refresh tokens because you're using the explicit (authorization code) flow in oauth2.. you're not using implicit flow to get the refresh tokens (because you can't), and you're not obtaining the refresh tokens from a server.. because you're doing it on the client side with exchangeForToken(). https://github.com/SpoonX/aurelia-authentication/blob/78ec6dd8e4621de76f694d676f73de07f3483faf/src/oAuth1.js#L49
That code exchanges an authorization code (when you use responseType 'code'), for a token... that's explicit flow.
When you do that call, that's where the problem is that 10.5, 10.6 talks about... e.g.
HTTP/1.1 302 Found
     Location: https://client.example.com/cb?code=SplxlOBeZQQYbYS6WxSbIA
               &state=xyz

^^ From explicit (authorization code) flow - https://tools.ietf.org/html/rfc6749#section-4.1.2
The https://client.example.com/cb?code=SplxlOBeZQQYbYS6WxSbIA&state=xyz can get logged in server logs (because server logs record query strings and user-agent history on the client side).
"Since authorization codes are transmitted via user-agent redirections, they could potentially be disclosed through user-agent history and HTTP referrer headers."
Tokens, funnily enough, aren't returned like that, they're returned like this..
HTTP/1.1 302 Found
     Location: http://example.com/cb#access_token=2YotnFZFEjr1zCsicMWpAA
               &state=xyz&token_type=example&expires_in=3600

The # (fragment) means it doesn't get logged in server logs or appear in user-agent history.
It's really subtle and not well explained.

http://stackoverflow.com/questions/35575171/oauth-2-0-authorization-code-flow-using-javascript
http://security.stackexchange.com/questions/67343/secure-rest-api-and-single-page-app-by-using-external-oauth-2-authorization-code
It's really poorly explained, because it's so complex a topic, and the cause of the problem is so subtle.

read write a bit an i'm still lost. let's ignore the auth0 for a sec, as that works different.
so, one common scenario is:

client: us. has access token for web api and refresh token for authorization server
user-agent: browser. gets xy from identity server and redirects it to authoritization provider to get it verified and exchanged for access token+refresh token
identity/authentication provider: facebook, confirms identity, issues xy token
authorization provider: own express server. confirms authentication with identity provider using xy token. issues access + refresh token. uses refresh token to issue new access token
web api: own express server. accepts and verifies short term access token to verify authorization

at no time there, the facebook client secret or the own authorization jwt secret is known to the client or the user-agent

Okay, I'll ask a simple question then..
Of the 4 different types of OAuth2 flows, what one are you using to get the refresh tokens?
https://tools.ietf.org/html/rfc6749#section-1.3
Which one?

authorization code for eg facebook.  the identitiy provider's secret is only on the server and the client never sees the facebook token as that's handled by the server
or user credentials if authenticating with the server directly

again, i don't know if' that's true also for the Auth0Lock version

So if you use authorization code flow, facebook send you back an authorization code, and you send that code back to them to get a token... right? Aurelia auth is the thing that's sending the code back to facebook via the web browser. That's potentially insecure (for the reasons I mentioned earlier) because it's not a web server that's receiving and sending the code back to facebook.

http://stackoverflow.com/a/25201443 - "The Authorization-Code-Flow allows for the final auth-token to never reach and never be stored on the machine with the browser/app."
Authorization Code Flow is a server to server flow. It's not a server to browser flow.. that's what Implicit Flow is.

 - that's how you make the decision on what flow to use. Authorization Code Flow should be authorization server to web server only. SPAs should only use Implicit Flow.

Statellizer does it properly.. there's a server script for exchanging the authorization code for a token.
https://github.com/sahat/satellizer/blob/ae7912b8e100a0ec86f66526c0b342b5392189b3/examples/server/node/server.js#L548
Aurelia auth which was supposedly based on Statellizer, (and subsequently, aurelia authentication) doesn't do it properly, they do it in the browser which is wrong for an SPA.
https://github.com/SpoonX/aurelia-authentication/blob/78ec6dd8e4621de76f694d676f73de07f3483faf/src/oAuth1.js#L49

i haven.t read all you wrote yet, so just a quick note.
for satellizer you linked the server side. we are doing the client side here.
maybe see my aurelia-authentication-loopback-sample for the whole deal
and for ours, you linked oauth1. nearly all providers are oauth2 now

Nevermind, I don't think you understand what I'm talking about. Maybe it will help others who want to take the time to understand oauth2 security issues.

i am taking the time. it.s just a lot you send me to read

well, to conclude this, we as well as aurelia-auth as well as satellizer do the same:
1 open popup with eg https://www.facebook.com/v2.5/dialog/oauth?client_id=937004143046787&display=popup&redirect_uri=http%3A%2F%2Flocalhost%3A9000%2F&response_type=code&scope=email
2 in the popup, the user logs into facebook (the authenication provider)
3 on sucess, facebook redirects the popup to eg http://localhost:9000/?code=***lengthy_code***g#_=_
4 the popup closes and aurelia-auth gets the code from the redirect query string
5 the code is send to the own authorization server
6 the server uses the code and sends it together with the client secret (only the authorization server has that) to facebook to validate the identity
7 facebook confirms by sending back the facebock access-token to the authorization server
8 the authorization server can request more info from facebook, eg email and profile
9 the authorization server creates it's own jwt (wihich has nothing to do with the facebook access token. that's only on the authorization server) and sends it's own newly created jwt back the client
10 the client can use the jwt to access the own api server (that api server has no knowledge about facebook. that's only on the authorization server. hence the api server also can access facebook directly neither)
11 the client can use a refresh_token to get from the authorization server a new own jwt for the web server (no facebook involved here)
12 the client might request facebook data by sending a request to the authorization server. the authorization server then can request that info from facebook and send it back to the client
you see, while the (alone useless) code from facebook is exposed to the user-agent, at no time the client has access to the facebook client secret or the facebook access token. that's always on the server only. all requests to facebook (other then login), have to be done via the authorization server, as only he has the access code and the client secret to do so
i hope, your concerns are addressed with that clarification. if you have trouble to find above steps in the code, please tell me. i'll can point you to them

though now i need to rethink, why the code isn't just send to the server directly, hmm. but maybe it is? thinking...

http://oauth2.thephpleague.com/authorization-server/which-grant/

Client Type?
Depending on whether or not the client is capable of keeping a secret will depend on which grant the client should use.
If the client is a web application that has a server side component then you should implement the authorization code grant.

so seems we are on the save side. anyways, this is the client. the client can't be unsave since it is inherently unsave. thus, any sercurity concerns are to be handled on the authentication and authorization server side.


GROOVY-7008 correctly escape special chars in map keys when generating JSON

First I cleaned up the groovy-json module so the code is more consistent.
Then I fixed the issue reported in GROOVY-7008:

formerly no escaping has been performed at all
now functionality is similar to JsonOutput#writeCharSequence()
performance degradation is about 15% for a map entry with key size 50

Looks good, thanks!


Heavy query on reports

We have a ridiculous DB query on reports:
EXPLAIN ANALYZE SELECT s0."address"->>'area', count(s0."address")
FROM (
    SELECT jsonb_array_elements(d1."addresses") AS "address"
        FROM "declarations" AS d0
        LEFT OUTER JOIN "divisions" AS d1 ON d1."id" = d0."division_id"
        WHERE (d0."status" IN ('active','pending_verification'))
        AND (d1."addresses" @> '[{"type": "RESIDENCE"}]'::jsonb)
) AS s0
WHERE (s0."address"->>'type' = 'RESIDENCE')
GROUP BY s0."address"->>'area';
                                                                    QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------------
 GroupAggregate  (cost=36635.67..36639.82 rows=155 width=40) (actual time=3440.070..3947.187 rows=26 loops=1)
   Group Key: ((s0.address ->> 'area'::text))
   ->  Sort  (cost=36635.67..36636.41 rows=296 width=64) (actual time=3433.247..3822.010 rows=552428 loops=1)
         Sort Key: ((s0.address ->> 'area'::text))
         Sort Method: external merge  Disk: 190144kB
         ->  Subquery Scan on s0  (cost=868.76..36623.52 rows=296 width=64) (actual time=13.134..1909.120 rows=552428 loops=1)
               Filter: ((s0.address ->> 'type'::text) = 'RESIDENCE'::text)
               Rows Removed by Filter: 424556
               ->  Hash Join  (cost=868.76..35736.28 rows=59100 width=32) (actual time=13.128..1447.700 rows=976984 loops=1)
                     Hash Cond: (d0.division_id = d1.id)
                     ->  Seq Scan on declarations d0  (cost=0.00..32448.62 rows=565055 width=16) (actual time=0.009..270.066 rows=552428 loops=1)
                           Filter: ((status)::text = ANY ('{active,pending_verification}'::text[]))
                           Rows Removed by Filter: 6635
                     ->  Hash  (cost=868.67..868.67 rows=7 width=646) (actual time=13.090..13.090 rows=6452 loops=1)
                           Buckets: 8192 (originally 1024)  Batches: 2 (originally 1)  Memory Usage: 4033kB
                           ->  Seq Scan on divisions d1  (cost=0.00..868.67 rows=7 width=646) (actual time=0.008..6.335 rows=6452 loops=1)
                                 Filter: (addresses @> '[{"type": "RESIDENCE"}]'::jsonb)
 Planning time: 0.273 ms
 Execution time: 3990.574 ms

The query takes good 4 seconds to execute, and uses enormous amount of disk space, 190Mb.
Let's analyze what went wrong and fix this.

Right now we get a great improvement in response time and resources usage, so i'll close this issue. If you feel we need a query improvement, please create a new one.


Senegal export seems to be taking a little longer each run

pretty sure this is because of the addition of the Garmin IMG format, which takes quite a while. The other exports don't seem to be increasing in time elapsed, unless they also had the Garmin format added.


The Google API key cannot be successfully used

When I finished setting up the Google API key, it kept showing failure when I tried to use it.

Same issue is seen.
Popup: fetch error.

Try downloading the latest version of CodeGPT (v3.1.4)
You can follow this tutorial: https://youtu.be/iSFMrkYVopg?si=iz8aIAg8MUReU3Zl


Remove signalr

Docs Build status updates of commit 39a1dbf:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

ci-configs/packages-preview.json
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


btcpop wallet and staking issues

As you may know, the btcpop exchange PKOIN wallet has been under maintenance for over two weeks. According to btcpop sopport, PKOIN has suffered multiple chain splits, and currently has no available block explorer API.
Does the pocketnet team have any insights into this issue?
Thanks.

is only a technical problem of protocol negotiation with BTCPOP

Thanks for your answer. I'm just a little bit frustrated with the situation.

We are negotiating with BTCPOP and we have been informed that the work has been restored. I will close this issue and return it if necessary.


[feature request]on issues page

Feature request?
Could it be a good idea to support the ToC on issues page?
Reason
Because some love to write something on issue page, of course, on the first block of issue page
And
If it support on gists, there is no reason to not support on issue page
:blush: thanks for your plugin, do love it

Sorry to get back to you this late. Thanks for your feedback!
I have considered adding it to issue pages before, just didn't think people would write this much in there. 😄. I will work on this soon.


Add vscoq-language-server to the platform

We would like to have the vscoq 2 language server to be integrated in the platform.
CC the others authors: @maximedenes  @rtetley
vscoq2 main branch is currently tested in Coq's CI, see https://github.com/coq/coq/pull/17678 .
Once the .dev packages is added to the extra-dev opam repo (pr in progress: https://github.com/coq/opam-coq-archive/pull/2606 ) I'll propose here a PR adding the package (and exposing one more binary vscoqtop from the snap). So far we have no release for 8.17, ad we do not plan to have one. The first one will target 8.18.
About the smoke test kit, I'm a bit unsure what to propose. We do have end to end tests (xvfb, mocha, node, vscode ...) in our CI, but that is a bit heavy to add here, and in any case it would not fix the current framework. But I could make a separate CI job firing up vscode under xvfb and just checking the language server is found and runs. What do you think?

My recalling is that at some point the platform maintainers will consider https://github.com/coq/platform/issues/347

My guess is that the platform maintainers / editorial board should consider all issues with label "package inclusion" from time to time.
See also https://github.com/coq/platform/pull/348#issuecomment-1617509353 by @MSoegtropIMC

If you have the time, we need something in the smoke test kit.
At least check that coq-prover.vscoqtop --help executes fine (on snap) and vscoqtop.exe --help on windows and something similar on OSX.
We may also want to ask for an alias on the snap store, so to elide the coq-prover. prefix, see https://github.com/coq/platform/blob/main/doc/README_Linux.md#aliases . Since it takes some days, we may act now for this one.

@gares : just a note: the smoke test kit does not use the aliases, but uses a direct path to the coqc binary. See:
https://github.com/coq/platform/blob/49d35b0284eab67113f5d1c259a144522f75c544/shell_scripts/create_smoke_test_kit.sh#L192

The main reason is that this requires fewer changes to the script. It should be fine to test everything else this way as well, but it would of course also make sense to test the aliases. Maybe one should add a run time option to the smoke test script to either use the (hacky) direct path or the aliases.
IMHO when we want the aliases to be used, we should at least make sure that the coq_makefile template does support this. Otherwise many (to most) snap users will use the direct path method. That the direct path method works is btw. an effect of that the situation of a snap used this way is quite similar to what happens on Windows and macOS.


Incorrect parsing of overriden, dashed properties

Parsing a dobule-word (dashed) property with overriden values emits proper name only for the first of the array values.

On the other hand, specifying the property name in the style object with dash works correctly, but throws an "unsupported property" warning

noted, will fix

this should be fixed and live in 2.18.0.


Support on demand instances

Recently I've hit the issue that AWS is out of capacity for the g3 instances in eu-central-1 quite often. To still be able to play I would like to have an option which allows me to spin up an on demand instance of the same type if no spot capacity is available.
I just skimmed through the code and am guessing that most of the process can be kept the same even for on demand instances - it seems like only a few spots in the code specifically do something with the spot APIs.

I was thinking of using the AutoScaling group feature that tries to fill in the requested capacity with spot instances, and fallback to ondemand in case there is not more spot.
It's also possible with the AutoScaling groups to define multiple instance templates, and let it decides which is the cheapest type (with spot or ondemand).

I'd also like to suggest ontop of the autoscaling, the ability to select only on demand as an extra option.

It seems that AutoScaling groups does not work in CloudRIG case as we need to stop the instance before creating an image from it: within an ASG the spot requests created are "one-time" and the underlying instances can not be stopped.
That's why I've implemented something based on SpotFleet instead.
We can imagine in the future to create a on-demand dedicated cloudformation template.


TASK: fix typos in docs using codespell

Please check the following:

[x] Do the tests still pass?[^1]
[x] Does the code comply with the style guide?

[x] Run make lint from the Wagtail root.

[ ] For Python changes: Have you added tests to cover the new/fixed behaviour?
[ ] For front-end changes: Did you test on all of Wagtail’s supported environments?[^2]

[ ] Please list the exact browser and operating system versions you tested:
[ ] Please list which assistive technologies [^3] you tested:

[ ] For new features: Has the documentation been updated accordingly?

Please describe additional details for testing this change.
I fixed some typos in the documentation using codespell

https://github.com/codespell-project/codespell

[^1]: Development Testing
[^2]: Browser and device support
[^3]: Accessibility Target

@crydotsnake thanks for these fixes, as noted some were already in.
I have updated your remote branch and added your name to the contributors, thanks for taking the time to submit these fixes!
I have added your name as Simon Krull, please let me know if you wanted it listed differently.

Hello @lb-
Thanks for your replys!
Where you have listed my Name? 🤔

See the files changed on this PR - CONTRIBUTORS.rst
For small typo fixes in docs we don't add these to the changelog.


[jetstack/cert-manager] upercase HTTP_PROXY env is not working properly

Describe the bug
Containers behind proxy. Container can work with lowercase http_proxy.  But in jetstack/cert-manager chart, template/deployment.yaml, the env values are all upercase.
Version of Helm and Kubernetes:
helm v3,  k8s 1.18.3, docker ce 19.03.12
Which chart:
jetstack/cert-manager
What happened:
pod cannot access internet ( cannot request acme cert)
What you expected to happen:
Add lowercase env like below:
{{- if .Values.http_proxy }}
- name: http_proxy
  value: {{ .Values.http_proxy }}
{{- end }}
{{- if .Values.https_proxy }}
- name: https_proxy
  value: {{ .Values.https_proxy }}
{{- end }}
{{- if .Values.no_proxy }}
- name: no_proxy
  value: {{ .Values.no_proxy }}
{{- end }}

How to reproduce it (as minimally and precisely as possible):
I tested by run a busybox.
set env with upercase HTTP_PROXY, wget is failed. lowercase is working.
Anything else we need to know:
maybe this issue is based on OS. My host is centos 7.

it could be solved by extraEnv
extraEnv:
- name: http_proxy
  value: "http://x.x.x.x"
- name: https_proxy
  value: "http://x.x.x.x"
- name: no_proxy
  value: "<IP_ADDRESS>"


cron starts even if ENABLE_CRON=FALSE

this line in 10-insync causes cron to start, even if ENABLE_CRON=FALSE
and then this line in services/04-cron/run adds another logrotate command to the root crontab.
is there any reason to add insync-headless to the crontab?
that instance won't be managed by s6

The entry in the cron startup is only for log rotation, which I don't believe I have any file logs built in on this image.
This sounds like a vendor issue with insync-headless - Some of this stuff is a real black box when getting it going under Docker so if it's doing that, does it add anything to the root crontab?