Help with failing PacketPeerUDP put_packet() and put_var() on Android

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Joleeee

My code looks something like this:

func _ready():
	print(udp_peer.set_dest_address("255.255.255.255", 1336))
	print(udp_peer.listen(1336))
func _update():
	for x in udp_peer.get_available_packet_count():
		var v = udp_peer.get_packet()
		if v != null:
			var ip = udp_peer.get_packet_ip()
			if !peer_ips.has(ip) && !own_ips.has(ip):
				peer_ips.append(ip)

    var err = udp_peer.put_var("looking")
    print(err) #returns 1 on android

peer_ips is discovered ips and own_ips is IP.get_local_addresses()

The problem is sending data. It successfully receives them but does not send any.
I recently tried turning on the Internet permission but to no success. Any help appreceated!

(the game works on my computer)